salve, ho un problemone con la chiamata verso un ws asp.net fatto attraverso un applet java e axis come motore di interfacciamento verso i ws.
praticamente io ho scritto questo codice:
codice:
String endpoint = "http://localhost:8080/wssipad/wssipad.asmx";
String soapAction ="http://www.enel.it/webservices/wssipad/QueryFolder";
String soapXmlNs = "http://www.enel.it/webservices/wssipad/";
URL endPointWS = new URL(endpoint);
Service service = new Service();
Call call = (Call) service.createCall();
call.removeAllParameters();
call.setTargetEndpointAddress(endPointWS);
call.setSOAPActionURI(soapAction);
call.setOperation("QueryFolder");
call.setProperty("xmlns",new Object[]{soapXmlNs});
call.addParameter("Library", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("User", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("FolderID", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("OrderBy", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("OutputFields", XMLType.AXIS_VOID,ParameterMode.IN);
call.addParameter("MaxOccurs", XMLType.AXIS_VOID, ParameterMode.IN);
String risultato = (String) call.invoke(new Object[] {"6", "5", "4","3", "2", "1"});
System.out.println(risultato);
il problema sta nella riga dell operazione in quanto la chiamata al server la fa scrivendo questo codice:
codice:
POST /wssipad/wssipad.asmx HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.2beta3
Host: 127.0.0.1:8080
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "http://www.enel.it/webservices/wssipad/QueryFolder"
Content-Length: 521
<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>
<QueryFolder xmlns=""> --->>>>>>>>>>>>>> questo è il problema, non mi scrive il namespace
<Library xsi:type="xsd:string">6</Library>
<User xsi:type="xsd:string">5</User>
<FolderID xsi:type="xsd:string">4</FolderID>
<OrderBy xsi:type="xsd:string">3</OrderBy>
<OutputFields xsi:type="xsd:string">2</OutputFields>
<MaxOccurs xsi:type="xsd:string">1</MaxOccurs>
</QueryFolder>
</soapenv:Body></soapenv:Envelope>
il problemone è che nella riga che ho evidenziato non riesco a scrivere il namespace e la chiamata fallisce in quanto il ws asp.net lo richiede.
come posso risolvere questo problemone??
ho provato ad impostare la riga dell operazione in ogni maniera ma nulla.
grazie anticipatamente