- - PR -
php で ASP.NET web service
1
投稿者 | 投稿内容 |
---|---|
|
投稿日時: 2008-01-07 23:44
VBでは、以下のように呼び出せるWeb Service を、php4+nusoap で作成していますが、相手のサーバが応答しません。なんらかのヒントになるようなポイントを教えていただけませんでしょうか。
------------------------------------------------------------------------------- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click service.Url = "http://somewhere.com/service.asmx" Dim arr(4) As web.inquiry For x As Integer = 0 To 4 arr(x) = New web.inquiry arr(x).DeliveryDate = Today.Date arr(x).Detail = "123" arr(x).InquiryId = 213 arr(x).password = "1234" arr(x).Price = 34.3 arr(x).StockId = 1234234 arr(x).userid = "someone" arr(x).Weight = 123.233 Next x If service.getInquiryAnswer(arr) = "1" Then MessageBox.Show("OK") End If End Sub ------------------------------------------------------------------------------- ちなみに、web serviceのwsdl 該当部分は、以下のとおりで、complexType の Arrayが入力パラメータです。 ------------------------------------------------------------------------------- - <s:element name="getInquiryAnswer"> - <s:complexType> - <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="arr" type="tns:ArrayOfInquiry" /> </s:sequence> </s:complexType> </s:element> - <s:complexType name="ArrayOfInquiry"> - <s:sequence> <s:element minOccurs="0" maxOccurs="unbounded" name="inquiry" nillable="true" type="tns:inquiry" /> </s:sequence> </s:complexType> - <s:complexType name="inquiry"> - <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="userid" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="InquiryId" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="StockId" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="DeliveryDate" type="s:dateTime" /> <s:element minOccurs="1" maxOccurs="1" name="Price" type="s:double" /> <s:element minOccurs="1" maxOccurs="1" name="Weight" type="s:double" /> <s:element minOccurs="0" maxOccurs="1" name="Detail" type="s:string" /> </s:sequence> </s:complexType> ------------------------------------------------------------------------------- このサービスを呼び出すのに以下のようなphpコードを書いていますが、タイムアウトになってしまって呼び出せません。サービス呼び出しのパラメータの与え方がおかしいものと考えているのですが、いろいろ調べていますが、解決できていません。 ------------------------------------------------------------------------------- require_once("nusoap.php"); $s = new soapclient("http://somewhere.com/service.asmx?WSDL", true); $proxy = $s -> getproxy(); $params[0] = array('DeliveryDate'=>'2007-12-25','Detail' => 'Detail infmation will be provided', 'InquiryId' => 123456, 'password' => 'pswd', 'Price' => 45000, 'StockId' => 1234567, 'userid' => 'someone', 'Weight' => 4.5 ); $params[1] = array('DeliveryDate'=>'2007-12-25','Detail' => 'Detail infmation will be provided', 'InquiryId' => 123456, 'password' => 'pswd', 'Price' => 45000, 'StockId' => 1234567, 'userid' => 'someone', 'Weight' => 4.5 ); $result = $proxy->getInquiryAnswer($params); ------------------------------------------------------------------------------- よろしくお願いいたします。 |
1