Hi,
I have a java web service method which is annotated with “javax.jws.Oneway”, which mean that this method has only an input message and no output.
From the generated wsdl i produce a js proxy which looks like this:
operations:[
{inputEncoding:“literal”, inputParts:“”, outputEncoding:“”, outputParts:“”, inputMessage:“applyActionToAllPackages”,
outputMessage:“”,name:“applyActionToAllPackages”, soapAction:“”}
]
As you can see the outputMessage is missing.
So i expect that when i execute the following
webserviceproxy.callOperation(
“applyActionToPackages”,
…}
no output will be expected.
But actually the binding layer throws an error
[Break on this error]
_1 has no properties
_7.callback={target:this,methodName:“$38…nvelope/”});if(_10.length==1)_10=_10[0]}
ISC_Data…inding.js (line 383)
How to tell the binding layer to skip the response parsing?
Regards,
nk
PS: another option which i have thought about was to pass the soap message directly via RPCManager.sendRequest:
RPCManager.sendRequest({
actionURL:webserviceproxy.dataURL,
contentType:"text/xml",
useSimpleHttp:true,
data:data
}
But how dynamically to construct more complex soap request - the “data” param.???
Hi Nikolay,
-
what does the response look like for this operation? Is it an empty SOAP envelope or nothing at all?
-
what are your remaining arguments to callOperation()?
-
what SmartClient version is this?
Note that you can call WebService.getSoapMessage() to get the SOAP XML message as a String, which you could then use as the “data” parameter to RPCManager.sendRequest - but be sure to set it to HTTP POST.
answers are inlined below:
- what does the response look like for this operation? Is it an empty SOAP envelope or nothing at all?
>>
=====response begin ======
HTTP/1.1 200 OK
Date: Thu, 30 Oct 2008 06:03:33 GMT
Server: TWAppliance
X-Powered-By: Servlet 2.4; JBoss-4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605)/Tomcat-5.5
Content-Length: 0
Keep-Alive: timeout=15, max=76
Connection: Keep-Alive
Content-Type: text/xml;charset=UTF-8
=====response end ======
- what are your remaining arguments to callOperation()?
.callOperation(
“applyActionToAllPackages”, {arg0:packageAction,arg1:initialSearchCriteria,arg2:packageIdToExclude},
null,
function(data, xmlDoc, rpcResponse, wsRequest) {
});
- what SmartClient version is this?
version 6.0
In order to use WebService.getSoapMessage() i need WSRequest
How to cunstruct WSRequest instance with my data in it?
The request should look like that:
====
<soap:Envelope xmlns:soap=‘http://schemas.xmlsoap.org/soap/envelope/’
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xmlns:xsd=“http://www.w3.org/2001/XMLSchema”><soap:Header></soap:Header><soap:Body>
<ns0:applyActionToAllPackages
xmlns:ns0=“uiwebserviceapp”>
<arg0>BLOCK</arg0>
<arg1>
<dateFrom>2008-10-30T00:00:00</dateFrom>
<dateTo>2008-10-30T15:05:26</dateTo>
<limit>7</limit>
<orderDesc>false</orderDesc>
<orderField>createDate</orderField>
<packageSizeGreaterThanBytes></packageSizeGreaterThanBytes>
<packageSizeLessThanBytes></packageSizeLessThanBytes>
</arg1>
</ns0:applyActionToAllPackages>
</soap:Body></soap:Envelope>
====
Hi Nikolay,
A call to getSoapMessage should just look like:
myWebService.getSoapMessage({
wsOperation : "applyActionToAllPackages",
data : {
arg0:packageAction,
arg1:initialSearchCriteria,
arg2:packageIdToExclude
},
... other WSRequest properties ...
})
So, it’s a lot like a call to RPCManager.sendRequest(), in that you don’t have to actually create an RPCRequest object and you don’t have to create a WSRequest either, you just pass the properties for it directly.