cancel
Showing results for 
Search instead for 
Did you mean: 

Soap Adapter

Former Member
0 Kudos

Hello.

I am trying to send an asynchronous message from R/3 to a web service using a soap adapter. I am using XI 2.0, with the ModuleBubbleHelperXMBWSImpl. These are the parameters I have entered:

  1. Bubble adapter java class

classname=com.sap.aii.messaging.adapter.ModuleBubble

#

  1. This adapter instantiates a bubble bag for supporting

  2. a xmb web service gateway. A bubble bag is a collection of Bubble

  3. instances that form some processing chain of message objects.

#

  1. Below parameter Bubble.Helper specifies the helper class that implements

  2. the ModuleBubbleHelper interface. This class is used to instantiate

  3. a bubble bag for this adapter.

#

#

  1. Sets the bubble module helper that can instantiate your bubble bag

Bubble.Helper=com.sap.aii.messaging.adapter.ModuleBubbleHelperXMBWSImpl

#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

  1. Below this line are the parameters specific to the ModuleBubbleHelperXMBWSImpl

#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

  1. The configuration of this helper class is divided in two parts. The first part

  2. specifies the adapter configuration for Web-Service clients communicating with an

  3. XMB server. The second part specifies the configuration for XMB clients

  4. communicating with a WebService server. Either one or both parts can be configured

  5. in a single configuration file. Or you may separate the configuration in two files:

  6. one for Web-Service clients communicating with an XMB server (by using only

  7. part 0 and part 1), and the other for XMB clients communicating with a Web-Service

  8. server (by using only part 0 and part 2).

            1. Part 0 (FromWS and ToWS) : common part ######

  1. Keeps the XMB headers in web service messages. Unless you need XMB header

  2. information in your web service client/server, you should set this value to false.

XMBWS.KeepHeaders=false

  1. Keeps the attachments in web service messages.

XMBWS.KeepAttachments=false

  1. Encodes the xmb headers into the special HTTP header string named x-xmb_ws_encoded.

  2. Unless you need XMB header information in your web service client/server, you

  3. should set this value to false.

XMBWS.UseEncoded=true

  1. Encodes the value of x-xmb_ws_encoded (see UseEncoded) in the request query string

  2. Note: To include the encoded xmb headers in the query string, both UseEncoded and

  3. UseQueryString must be set true. When this option is set true, make sure that

  4. the request URL is in an appropriate form so that the attached string does not

  5. violate the syntax for URL.

XMBWS.UseQueryString=true

  1. Uses the specified xml encoding for serializing the soap envelope. If unspecified,

  2. the default encoding utf-8 is assumed.

XMBWS.XMLEncoding=iso-8859-1

            1. Part 2 (ToWS): XMB clients to WS server ######

  1. The target URL for the web service, to which the adapter sends web service messages.

XMBWS.TargetURL=http://wpg-apps-30/engsys/distapps/RMSDev/RMSPublic.asmx?wsdl

  1. Uses a proxy server for calling XMBWS.TargetURL

#XMBWS.ProxyHost=proxy

#XMBWS.ProxyPort=8080

  1. Uses user-authentication for calling XMBWS.TargetURL

#XMBWS.User=anonymous

#XMBWS.Password=anonymous

  1. The port and path where the adapter waits for XMB messages from clients.

XMBWS.XMBPort=8210

XMBWS.XMBPath=/file/receiver

  1. The default SOAPAction HTTP request header to the web Service server

XMBWS.DefaultSOAPAction="xmbws"

  1. END

I keep getting this message:

09:46:25 (3835): Request transport message received at 8210/file/receiver

09:46:25 (3836): Request message parsed

09:46:25 (3840): Error occurred during processing: com.sap.aii.messaging.srt.BubbleException: com.sap.aii.messaging.mo.MalformedMessageException: Fatal Error: com.inqmy.lib.xml.parser.ParserException: Bad PUBLIC declaration (:main:, row:1, col:55);

I think my problem is that the XML is being created without an envelope, but I don't know how to fix this.

Can anyone help, please?

Thanks.

Nicole

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

Hi Nicole,

when you have an RFC call, are there any special letters, like French accents or German Umlauts?

Maybe you post the xml from the SXMB_MONI after the mapping to let us check it.

No, you need not create a SOAP envelope, that is the task of the SOAP adapter.

When you have XI 2.0, make sure that your Adapter Framework is as well XI 2.0 and look if you have applied the newest patch.

In your configuration you should set all parameters to false, in your case:

XMBWS.UseEncoded=false
XMBWS.UseQueryString=false

Hope that helps

Stefan

Former Member
0 Kudos

Hi. No, no special letters, I believe I'm running the same version Framework, and I tried setting those parameters back to false...Still not working.

Here's my XML:

<?xml version="1.0" encoding="UTF-8" ?>

- <ns0:ClassData xmlns:ns0="ns_Class">

- <Equip_Data>

<EQUNR>000000000010006226</EQUNR>

<EQKTX>TRANSF 300KVA PM 12470V LFCL- 600/347V</EQKTX>

<HERST>ASEA</HERST>

<SERNR>JOHN1</SERNR>

<TYPBZ />

<MATNR>000000000000813097</MATNR>

</Equip_Data>

</ns0:ClassData>

Thank you.

stefan_grube
Active Contributor
0 Kudos

Hi Nicole,

for me your XML worked well.

Do you send synchronous messages? Maybe the response is not valid. Could you check on the WebService, if the message arrives there?

Stefan

Former Member
0 Kudos

Hello.

So, you sent my XML to a web service and it went through? Does the web service automatically send a message back, even if I'm sending an asynchronous message? I'm not sure what the Bad PUBLIC declaration part of my error message is...Any ideas?

Thank you.

Nicole

stefan_grube
Active Contributor
0 Kudos

When the message is asynchronous, there is no response of course.

I have tested by sending your xml with a receiver SOAP adapter to a sender SOAP adapter. That worked for me. I have no idea, wy your scenario does not work.

Have you tested your WebService with a SOAP client like XML Spy?

Stefan

Former Member
0 Kudos

Hello.

The web service has been called from Visual Basic 5.0 and it is working correctly. Does the configuration of the soap adapter look correct? I'm not really sure what to try next. Could it be an issue with my receiver determination?

Thank you.

Nicole

stefan_grube
Active Contributor
0 Kudos

Hi Nicole,

finally I got a new idea: Your URL is:

XMBWS.TargetURL=http://wpg-apps-30/engsys/distapps/RMSDev/RMSPublic.asmx?wsdl

You have not applied any port. Please add the standard HTTP port number 80 to your URL:

XMBWS.TargetURL=http://wpg-apps-30<b>:80</b>/engsys/distapps/RMSDev/RMSPublic.asmx?wsdl

Regards

Stefan

Former Member
0 Kudos

That didn't work either...Thanks for trying. Is there anywhere else I can go for help?

Thank you.

Nicole

stefan_grube
Active Contributor
0 Kudos

Hi Nicole,

I am sorry that I have only the chance to guess, as I do not know your scenario and your web service. You wrote that your web service can be called from Visual Basic, so I need to assume that your URL and your parameter for <i>soap action</i> are correct, but they look strange to me and I think they might be incorrect.

Do you have a WSDL for your web service? Can you post it here? You can send me an email, when you do not want to post it in the forum.

Regards

Stefan

Former Member
0 Kudos

Hello, Stefan.

What should the soap action parameter be? Should it reflect something in the wsdl?

How do I email you directly?

Thank you.

Nicole

stefan_grube
Active Contributor
0 Kudos

The URL and the SOAP action are part of the WSDL definition.

Look at this example:


...

    <operation name="doGoogleSearch">
      <b><soap:operation soapAction="urn:GoogleSearchAction" /></b> 
        <input>
          <soap:body use="encoded" namespace="urn:GoogleSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> 
        </input>
        <output>
          <soap:body use="encoded" namespace="urn:GoogleSearch" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> 
        </output>
      </operation>
    </binding>
    <service name="GoogleSearchService">
      <port name="GoogleSearchPort" binding="typens:GoogleSearchBinding">
        <b><soap:address location="http://api.google.com/search/beta2" /></b> 
      </port>
    </service>
  </definitions>

As soap action take the value of attribut <i>soapAction</i> of the node <i>soap:operation</i>

As URL take the value of the attribut <i>location</i> of the tag <i>soap:address</i>.

Regards

Stefan

Answers (0)