Ciao Fra, ho buttato giù qualche riga di codice riguardante le difficoltà che hai incontrato, spero di aver interpretato bene il problema.... ti posto il codice scritto ( utilizzando JAXM ) e il messaggio SOAP generato:

CODICE:

package htmlForum;

import java.io.IOException;
import java.io.FileOutputStream;
// JAXM
import javax.xml.soap.SOAPConnectionFactory;
import javax.xml.soap.SOAPConnection;
import javax.xml.soap.MessageFactory;

import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPPart;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPHeaderElement;
import javax.xml.soap.SOAPBodyElement;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.Name;

import javax.xml.soap.AttachmentPart;
import javax.activation.DataHandler;
import javax.activation.FileDataSource;

import javax.xml.soap.SOAPException;
import javax.xml.messaging.URLEndpoint;


public class Esempio {
public static void main(String args[]) {
try {
System.out.println("Inizio creazione messaggio......");
MessageFactory messageFactory = MessageFactory.newInstance();
SOAPMessage requestSoapMsg = messageFactory.createMessage();


// Creo i componenti SOAP
SOAPPart requestSoapPart = requestSoapMsg.getSOAPPart();
SOAPEnvelope requestSoapEnv = requestSoapPart.getEnvelope();
SOAPBody requestSoapBody = requestSoapEnv.getBody();

SOAPBodyElement elemento = requestSoapBody.addBodyElement(requestSoapEnv.crea teName(null,"Discover","urn:schemas-microsoft-com:xml-analysis"));

elemento.setEncodingStyle("http://schemas.xmlsoap.org/soap/encoding/");
elemento.addChildElement(requestSoapEnv.createName ("RequestType")).addTextNode("MDSCHEMA_CUBES");


SOAPElement restrictions = elemento.addChildElement(requestSoapEnv.createName ("Restrictions"));
SOAPElement restrictionList = restrictions.addChildElement(requestSoapEnv.create Name("RestrictionList"));
SOAPElement cataloghi = restrictionList.addChildElement(requestSoapEnv.cre ateName("CATALOG_NAME")).addTextNode("FoodMart 2000");

SOAPElement properties = elemento.addChildElement(requestSoapEnv.createName ("Properties"));
SOAPElement propertyList = properties.addChildElement( requestSoapEnv.createName("PropertyList") );
SOAPElement dataSourceInfo = propertyList.addChildElement( requestSoapEnv.createName("DataSourceInfo") ).addTextNode("Provider=MSOLAP;Data Source=local;");
SOAPElement catalog = propertyList.addChildElement( requestSoapEnv.createName("Catalog") ).addTextNode("Foodmart 2000");
SOAPElement format = propertyList.addChildElement( requestSoapEnv.createName("Format") ).addTextNode("Tabular");


// Salvo tutti i cambiamenti prima di stampare a video
requestSoapMsg.saveChanges();
try {
//Se commenti questa linea e decommenti la successiva l'uscita sarà stampata su un file e non a video
requestSoapMsg.writeTo(System.out);
//requestSoapMsg.writeTo(new FileOutputStream("e:/generati/SOAPMessage.txt"));
} catch (IOException e) {
e.printStackTrace();
}
} catch (SOAPException e) {
e.printStackTrace();
}
System.out.println("\n Messaggio creato");
} // main()
}


MESSAGGIO SOAP:

Inizio creazione messaggio......
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<Discover: soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlnsiscover="urn:schemas-microsoft-com:xml-analysis" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<RequestType xmlns="">MDSCHEMA_CUBES</RequestType>
<Restrictions xmlns="">
<RestrictionList xmlns="">
<CATALOG_NAME xmlns="">FoodMart 2000</CATALOG_NAME>
</RestrictionList>
</Restrictions>
<Properties xmlns="">
<PropertyList xmlns="">
<DataSourceInfo xmlns="">Provider=MSOLAP;Data Source=local;</DataSourceInfo>
<Catalog xmlns="">Foodmart 2000</Catalog>
<Format xmlns="">Tabular</Format>
</PropertyList>
</Properties>
</Discover:>
</soapenv:Body>
</soapenv:Envelope>
Messaggio creato



Spero ti sia utile e che sia ciò che ti serve....in ogni caso ci sentiremo sul forum..ciaoooo