cancel
Showing results for 
Search instead for 
Did you mean: 

Problem calling a web service via SOAP ad.

Former Member
0 Kudos

Hi,

I need to call a web service in an synchronous RFC to Web service scenario.The provider of service said me that they are going to accept production order with the service they provide. However, service semms to have only 2 request parameters one is a string enumeration ("online" or "offline") but the other has no type. In WSDL it is shown as the following -

-<s:element minOccurs="0" maxOccurs="1" name="strFilenameOrXML">

- <s:complexType mixed="true">

- <s:sequence>

<s:any />

</s:sequence>

</s:complexType>

</s:element>

When I try to test the web service with Altova XML Spy it gives me the error "Object reference not set to an instance of an object" .. at StokbarPlus.ProdService.WriteProdToSB(XmlNode strFilenameOrXML, IntegrationType EntegrasyonTip)..

I guess the service is waiting for a xmlNode object...

Is it possible to assign an XI message(coming from RFC) as an xmlNode object to an element of a webservice message and send it by using SOAP adapter?.

I tried send the SOAP message by putting the whole xml(a sample order document) as a string constant in the strFilenameOrXML element and send but it did not work...

How should I proceed?

Thanks in advance for your help,

-Tarik

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

Ideally webservice wsdl should have all the fields that are required at receiver to process complete message. In this respect, the wsdl seems to be incorrect or incomplete. Please verify it with the receiver side.

OR It may be the case, the receiver is expecting a complete xml in one string and its processing logic is written in webservice.

Regards,

Prateek

Former Member
0 Kudos

Hi Prateek,

I totally agree with you. The format they want is a complete order document, however they provide me a WSDL which only describes me a method name and two field. So only two possibility remains 1- wrong WSDL 2- they want all their data inside an element as a string and after getting it they are going to parse it to an real xml doc.

For the 1st case it is obvious that I need to contact them suddenly

As for 2nd case; if they want all the data in an xml tag then Why didnt they use an element of type string? (instead they use a complex type as seen in the WSDL part I provided)

Or are there any other possibility?

prateek
Active Contributor
0 Kudos

Hey, i was going through

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2089f29b-b10a-2a10-5297-e258df0c...

According to this, the attribute "mixed" is not supported in XI.

Regards,

Prateek

Former Member
0 Kudos

Hi,

I am using XI 7.0 with SP14, document is valid to XI 3.0 SP10, and also it says

"Application encounters Error/throws Exception" which I didnt encounter. So I think it is not the problem...

thanks anyway,,,

Former Member
0 Kudos

I just tried to test the scenario with another tool (.NET web service studio). while preparing the sample request, It describes the type of the element as System.Xml.XmlNode, it may help to find out the problem

Former Member
0 Kudos

Hi,

Problem is still unsolved.

By the way I figured out that they are waiting the xml message inside strFilenameOrXML tag and tried to send it so. However it does not work. I have tried two different ways to send it.

First one is by using messages in WSDL: did not work because special chars like <,> in the message that I am sending in the tag is escaped .

The Second way is using the data types that I developed, it did not work too since the receiver expects one of the inner node's namespace prefix to exist.

I tried exporting the xsd of the message type, adding attributeFormDefault="qualified" to header, and reimporting it. It did not work, because it changes all nodes, but they want some specific node to be qualified.

Any suggestions?

Former Member
0 Kudos

Hi,

Solved with java mapping..

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Tarik,

In your scenario RFC to webservices , you are sending request from RFC to webservice it needs to send some response otherwise it shows the error message.check that webservice is sending some response back.

Regards,

Jayasimha Jangam

Former Member
0 Kudos

Hi,

I am only testing the service with test tool now, and yes, it sends some error messages which I mentioned above.

prateek
Active Contributor
0 Kudos

Is it possible to assign an XI message(coming from RFC) as an xmlNode object to an element of a webservice message

If the understanding is correct, u want the complete payload in a single node to extract it to ur receiver side structure. If yes, then u may proceed using xsl or java mapping as follows:

Regards,

Prateek

Former Member
0 Kudos

Thanks Prateek,

Actually I want to understand what they want since the WSDL is not enough explanatory,