cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Adapter error.

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Hi all.

Im posting a Web Services using HTTP adapter in receiver CC.

In SXI_Monitor get next error:

<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

....<soap:Body>

.........<soap:Fault>

................<faultcode>soap:Client</faultcode>

................<faultstring>Unable to handle request without a valid action parameter. Please supply a valid soap action.</faultstring>

........ <detail /> </soap:Fault> </soap:Body> </soap:Envelope>

<SAP:Stack>Http server code 401 reason Unauthorized explanation <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <HTML><HEAD><TITLE>You are not authorized to view this page</TITLE> <META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252"> <STYLE type="text/</SAP:Stack>

what sould i do??

Thanks

RP

Message was edited by:

Rodrigo Pertierra

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

Apply in the part "header fields" a new entry:

Name: SOAPAction Value: <your SOAP action>

Stefan

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi Stefan.

I've made it, but it doesn't work. im having the same error:

Unable to handle request without a valid action parameter. Please supply a valid soap action.

tryed writting SOAPAction,soapAction,SoapAction but nothing.

Regards

RP

Former Member
stefan_grube
Active Contributor
0 Kudos

Here my settings for a working scenario.

Check the correct spelling of the SOAP action. Do you have a WSDL? Then you have to look inside.

<br>

<img src='http://de.geocities.com/stefan_grube/sdn14-2.jpg'>

<br>

Regards

Stefan

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Stefan.

Im putting

Header Fields:

-


SOAPAction http://localhost/WsCustomers/CustomerInsert.

but it doesn't work

Im using a WSDL

Rgds

RP

Message was edited by:

Rodrigo Pertierra

stefan_grube
Active Contributor
0 Kudos

Search in the WSDL for:

<soap:operation soapAction="here is the SOAP action" />

I do not believe that "localhost" can be a valid part of any SOAP action.

Did that work with the receiver SOAP adapter? The SOAP action should be the same.

Stefan

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

yes, with SOAP adapter it works.

any Idea?

RP

stefan_grube
Active Contributor
0 Kudos

Does your mapping provide a SOAP envelope for the HTTP adapter scenario?

is user and password correct?

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

user and pass are right.

<i>Does your mapping provide a SOAP envelope for the HTTP adapter scenario?</i>

how can i do it? i dont understand what you're saying. my english is poor.

Rgds

Rp

stefan_grube
Active Contributor
0 Kudos

A SOAP message consist of a SOAP envelope with header and body.

Inside the XI you see only the body like this:

  <?xml version="1.0" encoding="UTF-8" ?> 
  <m:doGoogleSearch xmlns:m="urn:GoogleSearch">
  <key>0PYGhDZQFHIZjwnOEs53Fz9/ns6BVGq6</key> 
  <q>Shakira</q> 
  <start /> 
  <maxResults>10</maxResults> 
  <filter>1</filter> 
  <restrict>String</restrict> 
  <safeSearch>1</safeSearch> 
  <lr>String</lr> 
  <ie>String</ie> 
  <oe>String</oe> 
  </m:doGoogleSearch>

The SOAP adapter adds the SOAP envelope to complete the SOAP message:

 <?xml version="1.0" encoding="UTF-8" ?> 
  <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
  <SOAP-ENV:Body>
  <m:doGoogleSearch xmlns:m="urn:GoogleSearch">
  <key>0PYGhDZQFHIZjwnOEs53Fz9/ns6BVGq6</key> 
  <q>Shakira</q> 
  <start>0</start> 
  <maxResults>10</maxResults> 
  <filter>1</filter> 
  <restrict>String</restrict> 
  <safeSearch>1</safeSearch> 
  <lr>String</lr> 
  <ie>String</ie> 
  <oe>String</oe> 
  </m:doGoogleSearch>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>

The HTTP adapter does not provide this feature, so you to care about this by yourself.

Check this page:

http://www.w3schools.com/soap/

To create the SOAP envelope you can an XSLT mapping:

  <?xml version="1.0" encoding="UTF-8" ?> 
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
 <xsl:template match="/">
 <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP:Header /> 
 <SOAP:Body>
  <xsl:copy-of select="*" /> 
  </SOAP:Body>
  </SOAP:Envelope>
  </xsl:template>
  </xsl:stylesheet>

If you have a mapping, then you apply the XSLT as second mapping step.

Hope that helps

Stefan

Message was edited by:

Stefan Grube

Message was edited by:

Stefan Grube

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Stefan.

is there another way to solve my problem without XSLT mapping?

Rgds

Rodrigo

Message was edited by:

Rodrigo Pertierra

Former Member
0 Kudos

Hi,

Another option is to add this soap envelope by having a java mapping step instead of XSLT mapiping...

Let me ask you a question, which others have previously added...what is the need for you to use the HTTP adapter over the SOAP adapter ? SOAP adapter does all these jobs for you ...right ?

Thanks,

Renjith

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

my boss solicited me this change.

I dont know specifically why, but i must do it.

you know how it is.

Is posible define in the EPILOG the Soap envelope??

in this way, what i must do??

i never use an XSLT mapping, i dont have Idea how to do it, how to create, how to import it to XI, etc etc.

Sorry!

Rgds

RP

Message was edited by:

Rodrigo Pertierra

Message was edited by:

Rodrigo Pertierra

stefan_grube
Active Contributor
0 Kudos

> my boss solicited me this change.

> I dont know specifically why, but i must do it. you know how it is.

Why you don't tell him, that this does not work?

The SOAP adapter is made for calling a web service, the HTTP not.

> Is posible define in the EPILOG the Soap envelope??

> in this way, what i must do??

This won't work, as the message has a declaration:

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

When you add the SOAP envelope as prolog/envelope combination, the declaration is within the XML message. This leads to a parsing error.

> i never use an XSLT mapping, i dont have Idea how to

> do it, how to create, how to import it to XI, etc

Create the XSLT with a text editor (notepad will be sufficient). Call the file anyhing.xsl Open it with an Internet browser for a simple syntax check.

Use Winzip to create a zip file with the XSLT. In IR create an object Mapping -> imported archives, upload the zip file there. You should see the xslt program after upload here.

Create an interface mapping (when the interfaces that you use for routing are not in IR available, just type the names and namespaces manually) source interface and target interface can have the same name. Apply the xslt mapping here.

Activate everything. Go to ID, assign the mapping to the interface determination.

Here the link to online help:

http://help.sap.com/saphelp_nw04/helpdata/en/4c/b2ad3de2d76b3be10000000a114084/frameset.htm

Hope that helps,

Stefan

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

thanks a lot

stafan, i will try it. sorry i am not response before, i was on holidays

Rgds

Answers (4)

Answers (4)

Former Member
0 Kudos

HI,

In general if the error is 401 , then some thing related to User Authentication error

see as per the below link

/people/krishna.moorthyp/blog/2006/07/23/http-errors-in-xi

Check XIAPPLUSER is having this Role -SAP_XI_APPL_SERV_USER

• If the error is in XI Adapter, then your port entry should J2EE port 5<System no>

• If the error is in Adapter Engine

–then have a look into SAP note- 821026, Delete the Adapter Engine cache in transaction SXI_CACHE Goto --> Cache.

• May be wrong password for user XIISUSER

• May be wrong password for user XIAFUSER

– for this Check the Exchange Profile and transaction SU01, try to reset the password -Restart the J2EE Engine to activate changes in the Exchange Profile After doing this, you can restart the message

Regards

Chilla

bhavesh_kantilal
Active Contributor
0 Kudos

Chilla,

Have a look at the fault message,

<i>Unable to handle request without a valid action parameter. Please supply a valid soap action.</i>

This is not an authorization issue. The SOAP request to the webservice does not contain a valid SOAP action.

Regards

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Why are you calling a webvservice using the HTTP adapter?

Why not use the SOAP adapter?

Also as youa re using the HTTP adapter, you would need to create the emtire SOAP envelope as the output of your mapping. Have you done this?

Regards

Bhavesh

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

hi Bhavesh.

i havent made it. but is there another way to use Receiver HTTP adapter without change my mapping? set any parameter in receiver HTTP and define the SOAP Action?

previously i was using SOAP adpater a there no errors, but my boss proposed if its possible replace SOAP by HTTP adapter.

Regards

RP.

Message was edited by:

Rodrigo Pertierra

Former Member
0 Kudos
stefan_grube
Active Contributor
0 Kudos

When have used SOAP adapter and now you want to use HTTP adapter instead, you have to create the SOAP envelope in mapping, as the HTTP adapter does not provide this feature.

Regards

Stefan

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

inside receiver SOAP adapter you have an option to put : soap action

did you try filling it ?

Regards,

michal

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

Im not using Soap Adapter. im using HTTP adapter in receiver

Rgds

RP

Former Member
0 Kudos

Hi Rodrigo,

The error "Http server code 401 reason Unauthorized explanation" means that the destination system is not allowing you to send your message. They may require that you provide a client certificate or username/password.

Cheers,

Joe