We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

PHP + SOAP Envelope error

Hi,

I used php and the soap webservices to list all the studies and it worked fine. But when I tried to return the study metadata (using Getmetadata) I got the following error message:

Array ( [faultcode] => SOAP-ENV:Server [faultstring] => Array ( [!xml:lang] => en [!] => Could not access envelope: Unable to create envelope from given source: ; nested exception is com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source: ) )

And my error object is this:
Array ( [0] => LibXMLError Object ( [level] => 2 [code] => 201 [column] => 15 [message] => Namespace prefix bean on studyRef is not defined [file] => [line] => 13 ) [1] => LibXMLError Object ( [level] => 2 [code] => 201 [column] => 17 [message] => Namespace prefix bean on identifier is not defined [file] => [line] => 14 ) )


My XML is this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://openclinica.org/ws/study/v1">
 <soapenv:Header>
 <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
 <wsse:UsernameToken wsu:Id="UsernameToken-27777511" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
 <wsse:Username>'. $user . '</wsse:Username>
 <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' . $password . '</wsse:Password>
 </wsse:UsernameToken>
 </wsse:Security>
</soapenv:Header>
 <soapenv:Body>
<v1:getMetadataRequest>
<v1:studyMetadata>
<bean:studyRef>
<bean:identifier>' . $studyId . '</bean:identifier>
</bean:studyRef>
</v1:studyMetadata>
</v1:getMetadataRequest>
</soapenv:Body>
</soapenv:Envelope>


Any idea?

Comments

This discussion has been closed.