Solved

Accessing a .NET Web Service requires a dateTime object with PHP and nusoap

Posted on 2008-10-30
6
843 Views
Last Modified: 2013-12-13
I am working to integrate a clients PHP based web system with a .NET Web Service.

We have successfully integrated 20 of 21 processes.

The final process requests a dateTime object instead of a string, int or boolean.

I am completely at a loss for how to format this object in PHP/nusoap. The .NET server throws an error whenever it receives a int or string.

Does anybody have any idea what the .NET service is expecting?

Is it looking for a binary?

Any help is greatly appreciated. the WSDL for the associated service is listed below.

Thanks,
Michael
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <PlaceOrder xmlns="http://www.***.com">
      <Key>string</Key>
      <Order>
        <ResultsReceived />
        <ResultsReceivedBy>int</ResultsReceivedBy>
        <PK_OrderID>int</PK_OrderID>
        <FK_CustID>int</FK_CustID>
        <FK_LocID>int</FK_LocID>
        <LabCpID>short</LabCpID>
        <OrdDate />
        <OrdTotal>decimal</OrdTotal>
        <Discount>decimal</Discount>
        <FK_StatusID>int</FK_StatusID>
        <Ship>decimal</Ship>
        <PayMethod>unsignedByte</PayMethod>
        <PayNum>string</PayNum>
        <ApprovalCode>string</ApprovalCode>
        <TransactionID>string</TransactionID>
        <Processed>boolean</Processed>
        <ProcessedBy>int</ProcessedBy>
        <Instructions>string</Instructions>
        <Notes>string</Notes>
        <HIPPARecvd />
        <HIPPASent />
        <ResultsSetup />
        <FK_ResellerID>int</FK_ResellerID>
        <Source>string</Source>
        <HCPCode>string</HCPCode>
        <HidePrices>boolean</HidePrices>
        <Cleared>boolean</Cleared>
        <GroupCode>string</GroupCode>
        <patientemail>string</patientemail>
        <MemberID>string</MemberID>
        <GHR>string</GHR>
        <Onsite>boolean</Onsite>
        <SiteDate>string</SiteDate>
        <SiteLocation>string</SiteLocation>
        <Ext_OrderID>int</Ext_OrderID>
      </Order>
      <Customer>
        <CreateDnnAcct>boolean</CreateDnnAcct>
        <DNNID />
        <PK_CustID>int</PK_CustID>
        <LastName>string</LastName>
        <FirstName>string</FirstName>
        <Initial>string</Initial>
        <Address1>string</Address1>
        <Address2>string</Address2>
        <City>string</City>
        <FK_StateID>short</FK_StateID>
        <Zip>string</Zip>
        <Country />
        <Phone>string</Phone>
        <Fax>string</Fax>
        <Email>string</Email>
        <Gender />
        <DOB />
        <LastDate />
        <UName>string</UName>
        <UPass>string</UPass>
        <Source>string</Source>
        <Locked />
        <GroupName>string</GroupName>
        <Ext_MemID>int</Ext_MemID>
      </Customer>
      <TestList>
        <string>string</string>
        <string>string</string>
      </TestList>
    </PlaceOrder>
  </soap:Body>
</soap:Envelope>

Open in new window

0
Comment
Question by:Theorem44
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 

Author Comment

by:Theorem44
ID: 22845744
The item in question is on line 60. DOB.
0
 
LVL 13

Accepted Solution

by:
Xyptilon2 earned 250 total points
ID: 22858188
I'm not sure, but as of PHP 5.x there's a DateTime object in PHP, probably at least comparible to what it is expecting. Information can be found here: http://cn2.php.net/datetime

An example can be found here: http://ditio.net/2008/06/03/php-datetime-and-datetimezone-tutorial/

Goodluck!


0
 
LVL 25

Assisted Solution

by:Marcus Bointon
Marcus Bointon earned 250 total points
ID: 22874695
nusoap is now very old and not really maintained any more. PHP5's built-in SOAP client is pretty good now, but for better type support you might be better served by WSO2 which is far better than any other SOAP client for PHP: http://wso2.org/projects/wsf/php
0
 

Author Closing Comment

by:Theorem44
ID: 31511872
As it turned out, to receiving computer was expecting a custom serialization method that was written by their programmer.

I convinced them to simply accept my date as a properly formatted string and do their serialization on their end. Seems really stupid for a web service to accept strange object types anyways.

Thanks For your help. I have switched to WSO2.

I am splitting the points between the two of you.

-Michael
0
 
LVL 13

Expert Comment

by:Xyptilon2
ID: 22878128
Glad to see it got solved somehow :) goodluck!
0

Featured Post

Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question