on 05-22-2006 9:10 AM
Hi,
I have a web service deployed on WAS 6.40, which runs all right when I use the Web Services Navigator. However, when I try to use Axis to call it from a client, it just gives me an HTML page as return, where the error message says:
"Incorrect request style parameter value null."
The web service basically has a method "notify", which takes a String targetId and a Boolean available and returns a String.
The request that goes out with the test client in Web Service Navigator is:
POST /Notifier/Default?style=document HTTP/1.1
Host: drsd00146894a:50000
Content-Type: text/xml; charset="UTF-8"
Connection: close
Content-Length: 560
SOAPAction: ""
<?xml version="1.0" encoding="UTF-8" ?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Header><sapsess:Session xmlns:sapsess="http://www.sap.com/webas/630/soap/features/session/"><enableSession>true</enableSession></sapsess:Session></SOAP-ENV:Header><SOAP-ENV:Body><pns:notify xmlns:pns='urn:NotifierVi'><pns:targetId>test</pns:targetId><pns:available>false</pns:available></pns:notify></SOAP-ENV:Body></SOAP-ENV:Envelope>
With Axis, I do the following:
String endpoint =
"http://drsd00146894a:50000/Notifier/Default";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName("urn:NotifierVi", "notify"));
call.addParameter(new QName("urn:NotifierVi","targetId"), org.apache.axis.encoding.XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter(new QName("urn:NotifierVi","available"), org.apache.axis.encoding.XMLType.XSD_BOOLEAN, ParameterMode.IN);
call.setReturnType( org.apache.axis.encoding.XMLType.XSD_STRING );
Object myParams[] = new Object[2];
myParams[0]="uuid:CorePac";
myParams[1]=new Boolean(true);
call.invoke( myParams );
Now, I listened for the SOAP message that goes out on the wire, and there it says the following:
POST /Notifier/Default HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.3
Host: 127.0.0.1:50000
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 668
<?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>
<ns1:notify soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:NotifierVi">
<ns1:targetId xsi:type="xsd:string">uuid:CorePac</ns1:targetId>
<ns1:available href="#id0"/>
</ns1:notify>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:boolean" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">true</multiRef>
</soapenv:Body>
</soapenv:Envelope>
Now, what is wrong with that one? I can't really see where there are request parameters are missing..
Any hint as to where I'm going wrong would be greatly appreciated..
Regards,
Katrin.
Hi Katrin,
Did you by chance ever resolve this problem?
Thanks,
Chad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.