Hello I am new to axis2 (and to WS at all) and I have following problem.
Using wsdl2java I create stub and skeleton classes.
This is my client class which is calling the service GetCustomerFolder :
NPVRServiceStub.GetCustomerFolder req2 = new
NPVRServiceStub.GetCustomerFolder();
NPVRServiceStub.GetCustomerFolderInputType input2 = new
NPVRServiceStub.GetCustomerFolderInputType();
NPVRServiceStub.GetCustomerFolderInputSingleType inputs2 = new
NPVRServiceStub.GetCustomerFolderInputSingleType();
NPVRServiceStub.GetCustomerFolderInputTypeSequence sequence = new
NPVRServiceStub.GetCustomerFolderInputTypeSequence();
inputs2.setFolderName("s");
inputs2.setCustomerSmartvisionID(1);
sequence.setGetCustomerFolderInput(inputs2);
NPVRServiceStub.GetCustomerFolderInputTypeSequence[] pole = {sequence};
input2.setGetCustomerFolderInputTypeSequence(pole);
req2.setGetCustomerFolderRequestBody(input2);
NPVRServiceStub.GetCustomerFolderResponse res2 =
stub.getCustomerFolder(req2);
corresponding part of wsdl:
<wsdl:operation name="getCustomerFolder">
<http:operation location="nPVRService/getCustomerFolder"/>
<wsdl:input>
<mime:mimeXml part="getCustomerFolderRequestBody"/>
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="getCustomerFolderResponseBody"/>
</wsdl:output>
</wsdl:operation>
xsd:
<complexType name="getCustomerFolderInputSingleType">
<sequence>
<element name="customerSmartvisionID" type="int"/>
<element minOccurs="0" name="folderName" type="string"/>
</sequence>
</complexType>
<complexType name="getCustomerFolderInputType">
<sequence maxOccurs="unbounded">
<element name="getCustomerFolderInput"
type="tns:getCustomerFolderInputSingleType"/>
</sequence>
</complexType>
Soap Monitor shows this:
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<axis2ns2:getCustomerFolder
xmlns:axis2ns2="http://www.example.org/nPVR/">
<getCustomerFolderRequestBody>
</getCustomerFolderRequestBody>
</axis2ns2:getCustomerFolder>
</soapenv:Body>
</soapenv:Envelope>
the problem is that although this code will call the service and I will
receive response with data which I fill in appropriate method in skeleton
class, but in the request there are no parameters. Variable array is null.
public org.example.www.npvr.GetCustomerFolderResponse
getCustomerFolder (org.example.www.npvr.GetCustomerFolder
getCustomerFolder16)
{
GetCustomerFolderInputTypeSequence[] array =
getCustomerFolder16.getGetCustomerFolderRequestBody().getGetCustomerFolderInputTypeSequence();
TCPMon shows this request:
POST /ws/services/nPVRService/nPVRService/getCustomerFolder HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
SOAPAction: ""
User-Agent: Axis2
Host: 192.168.122.116:8181
Transfer-Encoding: chunked
1d
getCustomerFolderRequestBody=
0
So what am I doing wrong?
--
View this message in context:
http://www.nabble.com/Axis2-%28ADB%29-%3A-Problem-with-empty-RequestBody-tp17532435p17532435.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]