Topic
  • 2 replies
  • Latest Post - ‏2011-01-21T20:10:33Z by SystemAdmin
SystemAdmin
SystemAdmin
527 Posts

Pinned topic webservice soap from external to internal partnerusing basic athuntication

‏2010-10-27T21:22:43Z |
Hello Everyone,

we are trying work on soap webservice and send a passthru document from external to internal partner .we added userid authentication for external partner and how to set basic authentication work on external partner as we hitting from soap UI it is not recognizing the connection.Below is the one specified in documentation but as our knowledge on WPG is limited unable to understand the step ,please help on the issue.

HTTP basic authentication - Example
External partner’s ID (DUNS, Freeform or other), user ID
and its password are Base64 encoded and then passed in
the SOAP message as Authorization property on HTTP
connection
Encoded string input is PartnerID/userID:password
SOAP over HTTP message (partial)
POST /bcgreceiver/Receiver HTTP/1.1
Content-Length: 946
Content-Type: multipart/related; type="text/xml"; boundary="----=_Part_0_729729216.1171462831125"
SOAPAction:
Authorization: Basic OTg3NjU0MzIxL2FkbWluOmFkMTIzbWlu
User-Agent: Java/1.5.0
Host: localhost
Accept: text/html, image/gif, image/jpeg, *; q=.2, /; q=.2
Connection: keep-alive
….
Sample Java code
String toEncode = businessID +"/" + user +":" + pwd ;
httpConn.setRequestProperty("Authorization", "Basic " + (new com.ibm.misc.BASE64Encoder().encode(toEncode.getBytes())));
This page expands on the HTTP Basic Authentication for external partner. The sample
Java code shows the formation of the HTTP basic authentication value from the
participant’s business ID, its user and password. The HTTP connection’s “Authorization”
property is set with the value. The value is string “Basic” followed by Base 64 encoding of
the business ID, user and password. The encoding is done for the string containing the
business ID followed by “/” and then user followed by a colon and then the password.
Part of the SOAP over HTTP message from the sample Java code, is shown with the
HTTP connection Authorization property and the value.

As where this code has to be updated ,please provide screen shots .They advised to use Genericsoap UI client and how it works .

Thanks in advance.
Updated on 2011-01-21T20:10:33Z at 2011-01-21T20:10:33Z by SystemAdmin
  • AvV
    AvV
    117 Posts

    Re: webservice soap from external to internal partnerusing basic athuntication

    ‏2010-11-01T20:15:35Z  
    Herewith another Java sample code.

    The SOAPClient.properties would have the following entries :
    SOAPUrl =
    SOAPAction =
    username = businessID/user
    password =
    xmlFile2Send =

    Hope this helps.

    Regards, Arjan
  • SystemAdmin
    SystemAdmin
    527 Posts

    Re: webservice soap from external to internal partnerusing basic athuntication

    ‏2011-01-21T20:10:33Z  
    • AvV
    • ‏2010-11-01T20:15:35Z
    Herewith another Java sample code.

    The SOAPClient.properties would have the following entries :
    SOAPUrl =
    SOAPAction =
    username = businessID/user
    password =
    xmlFile2Send =

    Hope this helps.

    Regards, Arjan
    Thanks Arjan for the reply and helping me always