RE: [SOAP] Need help in creating a .NET compatible data type
| From: | cristopher pierson ewing | Date: | Thu, 22 Apr 2004 19:03:32 +0000 |
| Subject: | RE: [SOAP] Need help in creating a .NET compatible data type | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-1498@lists.php.net to get a copy of this message | ||
Jacob, Thanks for the reply, Here's the script I'm using as well as the
output back from it:
********************
Begin PHP script
********************
<?php
require_once('SOAP/Client.php');
//Set the URL for the DW WSDL:
$wsdlurl =
'https://digitalwell.washington.edu/feapi/frontendapi.asmx?wsdl';
//Create a SOAP WSDL object:
$wsdl = new SOAP_WSDL($wsdlurl);
//Create the local proxy to avoid having to re-parse WSDL on every call:
$client = $wsdl->getProxy();
//Show us the client, so we are sure everythings okay so far
echo $client.'<br>';
//Turn off SSL verification to bypass the cert problem with DW's CA Cert
$client->setOpt('curl',CURLOPT_SSL_VERIFYPEER,0);
$client->setOpt('curl',CURLOPT_SSL_VERIFYHOST,0);
//Set parameters for the query, using numbers from my data in DW
$iRecordID = 1934;
$iContainerCollectionID = 922;
$iApplicationID = 13;
$sInputClass = 'MediaGroup';
$sAttributeList = "";
//This variable is where I'm having trouble, should be a GUID (whatever
// that is!)
//$xSessionID = NULL; //This is still a problem. I'm unsure how to get a proper
// guid from the info Zach's given me!
$xSessionID = "00000000-0000-0000-0000-000000000000";
//Call the getInfo method using the above parameters:
$response =
$client->getInfo($iRecordID,$iContainerCollectionID,$iApplicationID,
$sInputClass,$sAttributeList,$xSessionID);
//output the errors that result so I can be confused by them:
if (PEAR::isError($response)) {
echo 'message: '.$response->getMessage().'<br>';
echo 'user info: '.$response->getUserInfo().'<br>';
echo 'get wire'.$client->__get_wire().'<br>';
} else {
echo $response;
}
?>
********************
End PHP Script
********************
********************
Begin Script Output
********************
Object
message: XML error on line 1 col 4 byte 4 not well-formed
user info: HTTP/1.1 200 OK Server: Microsoft-IIS/5.0 Date: Thu, 22 Apr
2004 18:59:00 GMT X-Powered-By: ASP.NET X-AspNet-Version: 1.1.4322
Cache-Control: private, max-age=0 Content-Type: text/xml; charset=utf-8
Content-Length: 1780 <?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><GetInfoResponse
xmlns="DigitalWellPronEndAPI"><GetInfoResult><xs:schema
id="NewDataSet"
xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"><xs:element
name="NewDataSet" msdata:IsDataSet="true"><xs:complexType><xs:choice
maxOccurs="unbounded"><xs:element
name="Table"><xs:complexType><xs:sequence><xs:element
name="RecordID"
type="xs:int" minOccurs="0" /><xs:element name="Title"
type="xs:string"
minOccurs="0" /><xs:element name="Description" type="xs:string"
minOccurs="0" /><xs:element name="ImagePath" type="xs:string"
minOccurs="0" /><xs:element name="Contributor" type="xs:string"
minOccurs="0" /><xs:element name="Rights" type="xs:string"
minOccurs="0"
/><xs:element name="RelatedMaterial" type="xs:string"
minOccurs="0"
/><xs:element name="Location" type="xs:string" minOccurs="0"
/><xs:element
name="Date" type="xs:string" minOccurs="0" /><xs:element
name="Coverage"
type="xs:string" minOccurs="0" /><xs:element name="Subject"
type="xs:string" minOccurs="0"
/></xs:sequence></xs:complexType></xs:element></xs:choice></xs:complexType></xs:element></xs:schema><diffgr:diffgram
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"><NewDataSet
xmlns=""><Table diffgr:id="Table1"
msdata:rowOrder="0"><RecordID>-1</RecordID><Title /><Description
/><ImagePath /><Contributor /><Rights /><RelatedMaterial /><Location
/><Date /><Coverage /><Subject
/></Table></NewDataSet></diffgr:diffgram></GetInfoResult></GetInfoResponse></soap:Body></soap:Envelope>
get wire
********************
End Script output
********************
In case it would help, I've also attatched the two XML files that describe
the GUID data type, according to my source at the above-mentioned web
service.
If you or anyone else can help me figure out how to give the .NET SOAP
server what it wants, I'll be a much happier coder!
Thanks,
Cris
********************************
Cris Ewing
CME and Telehealth Web Services
University of Washington
School of Medicine
Work Phone: (206) 685-9116
Home Phone: (206) 365-3413
E-mail: cewing@u.washington.edu
*******************************