PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 27th, 2012, 07:08 AM
madhu007 madhu007 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 4 madhu007 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 m 57 sec
Reputation Power: 0
PHP Web service

I am calling ASP.NET Web service using PHP 5.3 (SoapClient)
Below is my WebService code.

<soap:Body>
<CreateCustomerOrder xmlns="(url)/">
<co>
<Auth_String>string</Auth_String>
<Ext_SystemName>string</Ext_SystemName>
<Ext_SystemReferenceNumber>string</Ext_SystemReferenceNumber>
<Cust_Num>string</Cust_Num>
<Cust_Seq>int</Cust_Seq>
<Order_Date>dateTime</Order_Date>
<Cust_PO>string</Cust_PO>
<Whse>string</Whse>
<Ship_Code>string</Ship_Code>
<Taken_By>string</Taken_By>
<Item>string</Item>
<Cust_Item>string</Cust_Item>
<Qty_Ordered>string</Qty_Ordered>
<Due_Date>dateTime</Due_Date>
<Prom_Date>dateTime</Prom_Date>
<Price>string</Price>
<Notes>string</Notes>
</co>
</CreateCustomerOrder>
</soap:Body>

Below is my PHP code:

--------------------------------
$wsdl="url"; //IDOServiceClient URL
$client=new SoapClient($wsdl);
$param=array("Auth_String"=>"test", "Ext_SystemName" => "TestingApp","Ext_SystemReferenceNumber" => "Reference Number","Cust_Num" => "1","Cust_Seq" => 10,"Order_Date" => $today,"Cust_PO" => "KKPO0016","Whse" => "MAIN","Ship_Code" => "UPS","Taken_By" => "KK","Item" => "FG-GE-0991","Cust_Item" => "KK Cust Item 908","Qty_Ordered" => "1","Due_Date" => $_ndate,"Prom_Date" => $_ndate,"Price" => "1.4","Notes" => "Testing notes");
$res = $client->CreateCustomerOrder($param);
print_r($res);
-------------------------------
My problem is parameters are not passing to web service.
Can any one help me in this

Reply With Quote
  #2  
Old November 27th, 2012, 11:38 AM
msteudel's Avatar
msteudel msteudel is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Sep 2002
Location: Seattle, U.S.A.
Posts: 712 msteudel User rank is Lance Corporal (50 - 100 Reputation Level)msteudel User rank is Lance Corporal (50 - 100 Reputation Level)msteudel User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 4 Days 11 h 4 m 59 sec
Reputation Power: 11
Use PHP tags please, its hard to read.

Reply With Quote
  #3  
Old November 27th, 2012, 11:44 AM
msteudel's Avatar
msteudel msteudel is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Sep 2002
Location: Seattle, U.S.A.
Posts: 712 msteudel User rank is Lance Corporal (50 - 100 Reputation Level)msteudel User rank is Lance Corporal (50 - 100 Reputation Level)msteudel User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 4 Days 11 h 4 m 59 sec
Reputation Power: 11
It looks like you are doing it correctly, though there are a lot of parameters, so possibly passing something in incorrectly. Are you getting a response back? Or and error message?

Reply With Quote
  #4  
Old November 27th, 2012, 10:21 PM
madhu007 madhu007 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 4 madhu007 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 m 57 sec
Reputation Power: 0
I am getting response like below

Result
Array
(
[CreateCustomerOrderResult] => Array
(
[Status] => Error
[Message] => Error occured while processing order
[Request_ID] => 110
)

)

Error, because of parameters are not passing to my webmethod (asp.net)

Reply With Quote
  #5  
Old November 28th, 2012, 12:22 PM
msteudel's Avatar
msteudel msteudel is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Sep 2002
Location: Seattle, U.S.A.
Posts: 712 msteudel User rank is Lance Corporal (50 - 100 Reputation Level)msteudel User rank is Lance Corporal (50 - 100 Reputation Level)msteudel User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 4 Days 11 h 4 m 59 sec
Reputation Power: 11
What happens if you pass nothing into the method, do you get the same error? I wonder if perhaps you are passing the parameters but something about the values is incorrect.

Reply With Quote
  #6  
Old November 28th, 2012, 12:43 PM
requinix's Avatar
requinix requinix is offline
Still alive
Click here for more information.
 
Join Date: Mar 2007
Location: Washington, USA
Posts: 12,698 requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)  Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 1 Week 4 Days 4 h 54 m 57 sec
Reputation Power: 8969
Send a message via AIM to requinix Send a message via MSN to requinix Send a message via Yahoo to requinix Send a message via Google Talk to requinix
What about the <co>?

Reply With Quote
  #7  
Old November 28th, 2012, 10:58 PM
madhu007 madhu007 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 4 madhu007 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 m 57 sec
Reputation Power: 0
I changed my code like below and it's working fine...

$soapClient = new SoapClient
('http://inhyvwsyte80300/IDOService/IDOServiceClient.asmx?WSDL'); //IDOServiceClient URL

$today= date("Y-m-d");
$next = mktime(0,0,0,date("m"),date("d")+1,date("Y"));
$_ndate = date("Y-m-d", $next);

try
{
$search_query = new StdClass();
$search_query->co = new StdClass();
$search_query->co->Auth_String = "test";
$search_query->co->Ext_SystemName = "TestingApp";
$search_query->co->Ext_SystemReferenceNumber = "Reference Number";
$search_query->co->Cust_Num = "1";
$search_query->co->Cust_Seq = 10;
$search_query->co->Order_Date = $today."T14:00:00";
$search_query->co->Cust_PO = "KKPO0016";
$search_query->co->Whse = "MAIN";
$search_query->co->Ship_Code = "UPS";
$search_query->co->Taken_By = "KK";
$search_query->co->Item = "FG-GE-0991";
$search_query->co->Cust_Item = "KK Cust Item 908";
$search_query->co->Qty_Ordered = "1";
$search_query->co->Due_Date = $_ndate."T14:00:00";
$search_query->co->Prom_Date = $_ndate."T14:00:00";
$search_query->co->Price = "1.4";
$search_query->co->Notes = "Testing notes";
$info = $soapClient -> CreateCustomerOrder($search_query);

} catch (SoapFault $fault) {
echo "ERROR" .$fault;
}

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > PHP Web service

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap