cancel
Showing results for 
Search instead for 
Did you mean: 

Error in .NET Application trying to use a Web Service (WSDL file)

Former Member
0 Kudos

  Hi There,

I have a WSDL file generated by the WSDLGen, it can be used from the SOAPUI
application well, all the information is retrieved to the SOAPUI; BUT when I
tried to use the same WSDL file from a Visual Studio C# application, it failed,
it display the error you can see in the "Error in VS C#.png" file.  You can try to run the sample application in the zip file.

 


 
 
 
 
 
 
 
 
 
 
 
 




Accepted Solutions (0)

Answers (1)

Answers (1)

former_member196557
Active Contributor
0 Kudos

HI Maria,

You need to declare a variable of type  XacuteResponse  to receive the response, and then extract the rowset from the response variable's .RowSet property.

Regards, Steve

Former Member
0 Kudos


Hi Steve, thanks for your answer.

you can see in the image my WSDL file. The problem is that I have 7 "strings" declared (those in the REd box), but they are NOT an string, they are tables, so, inside each one, I have more than one field, but I do not why the WSDL declare it as string. How can I generate a WSDL file that defines them as a ComplexType? 

former_member196557
Active Contributor
0 Kudos

Hi Maria,

How are you defining the Output items in your transaction? can you share a screen shot of the MII Transaction properties?

What is contained in these tables that you are receiving from the transaction?

Regards, Steve

Former Member
0 Kudos

Hi Steve,

This is the MII transaction properties:

Below you can see the fields inside each of the seven Outputs defined in the MII transaction.

O_A_ORDHDR (OUTPUT in the MII transaction), this are the fields inside it:

O_B_OPTIONS (OUTPUT in the MII transaction), this are the fields inside it:

O_C_CLASS (OUTPUT in the MII transaction), this are the fields inside it:

O_D_COMPSNO (OUTPUT in the MII transaction), this are the fields inside it:

O_E_ORDCNF (OUTPUT in the MII transaction), this are the fields inside it:

O_F_ORDSTATS (OUTPUT in the MII transaction), this are the fields inside it:

O_G_QNOTE (OUTPUT in the MII transaction), this are the fields inside it:

former_member196557
Active Contributor
0 Kudos

Hi Maria,

First, please review this blog posted by Salvatore Castro. If the response from the table query you are executing in MII is in a Rowsets/Rowset/Row Document format, simply apply the xsd referenced in the blog to each MII Output transaction and select the Rowsets Element Name, like this:

You should also insert a sample of each the query results in the related Output Transaction as well. Once you have accomplished this and saved the transaction, from Visual Studio simply Update your Service Reference.

You may have to build an XSD specific to your query responses if they are not in the Document format above. But once you have done this correctly, your WSDL and the response from the MII transaction should have the correct type mapping for the response.

Regards, Steve

Former Member
0 Kudos

Hi Steve,

My XSD looks different to the one that Salvatore Castro posted.

This is my XSD, in the blog tje XSD is defined with an "<s:", and I have "<xs:", Is there a way a generate the XSD to have it like in the blog?

Additionally, in my Transaction Properties detail, I do not see the option "Rowset" in the Element Name, how can I see it there?.

former_member196557
Active Contributor
0 Kudos

Hi Maria,

I think in this case you simply use your XSD and map the XSD Element to your Table, as you have selected in the screen shot. After you copy a sample result query xml into the Output variable, save the transaction and then refresh your .Net Service Reference, and see if the WSDL is now updated with the Type for that variable.

Regards, Steve

Former Member
0 Kudos

Hi Steve,

I tried different ways to copy the Sample result into the Output Variable, but I receive the following errors:

Former Member
0 Kudos


Hi Steve,

Do you know why I'm receiving the error I uploaded on October 03?

Thanks for your help !

HariCS23
Contributor
0 Kudos

Hi Maria, Why don't you try to transform your BAPI output to MII XML format using action blocks under "SAP MII XML output" and use xsd in the above mentioned blog.

I know this takes toll on performance of your Transaction since you need to loop through BAPI OP and load MII xml op documents. But it is worth a try in my opinion.

Hope this helps !

Thanks

Hari