Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
CapQNX
Posts: 99
Registered: ‎01-11-2013
My Device: BlackBerry Curve
My Carrier: Docomo

How to call Asp.Net Web-service with Input Parameter..

hello, friends..

 

I am stuck at this functionality. I have to call ASP.NET web-service with some Input Parameter (also image), I searched lots but I cant found out any source code.  Please give me some source code or link.. 

 

Thanks..

Please use plain text.
Developer
simon_hain
Posts: 15,863
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: How to call Asp.Net Web-service with Input Parameter..

Is it a soap or a json webservice?

 

For a soap webservice i use QtSoap.

To add parameters i use code like that, in this example to add a parameter "Item" in a list of "Items".

You can find documentation and samples for QtSoap online.

 

QtSoapStruct* inputValues = new QtSoapStruct(QtSoapQName("Items"));
request.addMethodArgument(inputValues);
QtSoapStruct* item = new QtSoapStruct(QtSoapQName("Item"));
item->insert(new QtSoapSimpleType(QtSoapQName("Name"), "_OS"));
item->insert(new QtSoapSimpleType(QtSoapQName("Value"), "BB10"));
inputValues->insert(item);
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
CapQNX
Posts: 99
Registered: ‎01-11-2013
My Device: BlackBerry Curve
My Carrier: Docomo

Parsing SOAPXML data

[ Edited ]

hiiiiiiii Coders,

 

     I tried to implement Asp.net web services using QtSoapHttpTransport object but ,  i got error while calling Web-services like this

 

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<Faultcode xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">SOAP-ENV:VersionMismatch</Faultcode>
<Faultstring xsi:type="x...

 

 

Please reply if any idea how to solve this error.

 

Thanks in Advance.                                                                                                         

 

 

Please use plain text.
Developer
simon_hain
Posts: 15,863
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Parsing SOAPXML data

i would suggest that you use soapUI to create a working request and compare it with the debug output from your application to see the difference.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
CapQNX
Posts: 99
Registered: ‎01-11-2013
My Device: BlackBerry Curve
My Carrier: Docomo

Re: Parsing SOAPXML data

I can't change anything in WS, because its created by other developer.. I am getting ERROR like this "SOAP-ENV:VersionMismatch"... Any solution around this error.. I never seen this error before..
Please use plain text.
Developer
simon_hain
Posts: 15,863
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Parsing SOAPXML data

as i said, check the differences between your code request (debug output) and one that is working, for example from SoapUI
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
CapQNX
Posts: 99
Registered: ‎01-11-2013
My Device: BlackBerry Curve
My Carrier: Docomo

Re: Parsing SOAPXML data

I don't have SoapUI.. so I have to test only client side..
Please use plain text.
Developer
simon_hain
Posts: 15,863
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Parsing SOAPXML data

soapUI is a client (tool), and you can download it for free at soapui.org
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.