SOAP Help
Posted: Wed Apr 06, 2011 11:49 am
Hey all, I am in the midst of building an application that requires a soap request. I know very little about this coming in, so I have been banging my head a few times here.
I am using Zend Framework for this application so I am using it's soap_client.
Basically, things seem like they would be simple enough. I point the client ad the wsdl file then call the appropriate function. I was getting back a message that says: Invalid Username/Password. So I looked into ZFs class and added a login and password and now I get back Unauthorized.
I contacted my point of contact with the company we are doing the soap call to and they said to authorize I need to add the following xml to the header:
However, I am not sure how to go about doing this.
I am using Zend Framework for this application so I am using it's soap_client.
Basically, things seem like they would be simple enough. I point the client ad the wsdl file then call the appropriate function. I was getting back a message that says: Invalid Username/Password. So I looked into ZFs class and added a login and password and now I get back Unauthorized.
I contacted my point of contact with the company we are doing the soap call to and they said to authorize I need to add the following xml to the header:
Code: Select all
<wsse:Security xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="id-734e5a5c-ccd0-11db-90b7-512fcdfa7c5f"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username> username </wsse:Username>
<wsse:Password> password </wsse:Password>
</wsse:UsernameToken></wsse:Security>