Skip to Content
0
Former Member
Nov 07, 2012 at 11:15 PM

wsdl2obj input parameter problem

31 Views

Hi,

i have a simple rfc that takes a string(input) and returns that string(output).

On the xcode part, i'm using wsdl2obj.

Here is the code

//create web service binding

zstringSoapBinding *binding = [[zstringSoapBinding alloc] initWithAddress:@"http://../sap/bc/srt/rfc/sap/ZSTRING?sap-client=020&wsdl=1.1"];

binding.logXMLInOut = YES;

binding.authUsername = @"";

binding.authPassword = @"";

// create web service request object

zstringService_ZSTRING *request = [[zstringService_ZSTRING alloc]

init];

NSString * str = [NSString stringWithFormat:@"asd"];

request.INPUT = str;

// call the request

zstringSoapBindingResponse *response = [binding ZSTRINGUsingParameters:request];

NSArray *responseBodyParts = response.bodyParts;

On the log the ResponseBody is ;

ResponseBody:

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Body><soap-env:Fault><faultcode>soap-env:Client</faultcode><faultstring xml:lang="en">Deserialisation failed</faultstring><detail><n0:SimpleTransformationFault xmlns:n0="http://www.sap.com/transformation-templates"><MainName>/1BCDWB/WSS0121107152246421000</MainName><ProgName>/1BCDWB/WSS0121107152246421000</ProgName><Line>10 </Line><Valid>X</Valid><MatchFault><DescriptionText>System expected element &#39;INPUT&#39;</DescriptionText><TokenType>E</TokenType><TokenName>ZSTRING</TokenName><TokenNameSpace>urn:sap-com:document:sap:rfc:functions</TokenNameSpace><TokenValue></TokenValue></MatchFault><Caller><Class>CL_SRG_RFC_PROXY_CONTEXT</Class><Method>IF_SXML_PART~DECODE</Method><Positions>1 </Positions></Caller></n0:SimpleTransformationFault></detail></soap-env:Fault></soap-env:Body></soap-env:Envelope>

Can you help me about this problem please ?

Regards,