cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to map Header info of request XML in SAP MII Web Service action block

Former Member
0 Kudos

Hi,

Background :

1. We have a web service that has Header and Body portion in its Request XML of SOAP Envelope  .

2. In Header portion SOAP request needs an authentication key .This key authenticates the request . This key is generated by another WebService .

For Example :

<soapenv : Envelope  xmlns:.....

  <soapenv : Header >

       <AuthenticationKey>?</AuthenticationKey>

   </soapenv : Header>

   <soapenv : Body >

        ....

           <Input1>? </Input1>

             <Input2>?</ Input2>

    </soapenv : Body>

  <soapenv : Envelope>

Query :

Now , We are using Web Service Action block in SAP MII Workbench Transaction ,

I am able to see the Input tags of WebService request that are there in Body part of SOAP XML . I can map my input value to it .

But ,

I am not able to find the authentication key tag( i.e Header Part of SOAP request XML)  mapping in the Link Editor of Web Service action block .

Without mapping Authentication key tag to request , Web Service action block gives Exception on running the transaction .

In Short :- What I want to know is how can we map Header details of a SOAP request in SAP MII  Web Service action block  in order to consume a web service ??

Your response will be appreciated .

Thanks and Regards,

Neha


Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Neha,

You can try the below approach, Hope it will help.

You can store the schema of the Web service in the local properties and can create the complete request structure in the BLS by putting the respective values of each node and at the end you can just map the complete request structure into the Web service Request (under link editor).

Regards,

Suman

Former Member
0 Kudos

Hi Suman,

We have tried the suggested way by using two  formats of schema in local properties

1) The webservice soapUI request format.

2) MII webservice request format.

In both the cases we received response but it had some default data fields that too when we try out this using a catch action block.

Without the catch action block it throws "unspecified error"

Since SAP MII doesn't define the request in a body schema unlike  a standard request format,we have tried the schema as below :

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

<Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" ...>

   <Header>

      <webserviceAuthentication> <Authenticationkey>?</Authenticationkey>

      </webserviceAuthentication>

   </Header>

<Body>

<GetWebservice1>

    <Input1>?</Input1>

</GetWebservice1>

</Body>

</Envelope>

We mapped  Input1 & authentication key (which is fetched as an output of another authentication webservice) using assignment action block.

But the response generated fails to show the correct data values ,it displays some default values .

Thanks & Regards,

Neha

Former Member
0 Kudos

Hi Neha,

You can try another approach to solve it, I hope it will work.

Create a local properties with map data type and put the Operation name(what exact you can see in Web service config) in Key and put the MII webservice request format in Value field.

After that you have to map this local variable to the "Inputs" field in the web service Link.

Hope it will help you,

Regards,

Suman

Former Member
0 Kudos

Hi Suman,

I tried out the alternative of creating a local variable of type "Map" and linking it to the Input Feild.

Even then I am getting "Unspecified Error".

Other problem I am facing is that I am not aware of the exact format of request xml that the web service requires.

I need to map authentication token,hence I created the request xml structure trying out various formats.

Thanks again .

Neha