cancel
Showing results for 
Search instead for 
Did you mean: 

web service date format problem

Former Member
0 Kudos

Hi, I am using a web service from another R/3 server. Its date format is like this..

- <xsd:simpleType name="date">

- <xsd:restriction base="xsd:string">

<xsd:maxLength value="10" />

<xsd:pattern value="\d\d\d\d-\d\d-\d\d" />

</xsd:restriction>

when I created a Proxy class, the date field length is 8.

I write my code and tryed execution. Its not giving any result and no exceptions also.

I think the problem is with Date field..

Suggest me how to solve this problem.

Regards,

Dhanunjaya Reddy

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

thanks guys.

Former Member
0 Kudos

Hi Dhanunjaya,

If you are calling web service from your code, then it is executing like this->

Your Code--> Proxy---> Already existing web service

You are making a call to proxy, not to web service directly.

And in proxy it is defined as type D( with length 😎 which is equivalent to YYYYMMDD.

So try passing the value YYYYMMDD(eg 20070505) from your code.

Regards,

Piyush

YYYYMMDD

Former Member
0 Kudos

But in SAP Proxy class, the date fromat is coming type D only. How to pass the date to the web service?

AndreasHuppert
Product and Topic Expert
Product and Topic Expert
0 Kudos

IMO, the web service should be called with a date such as 2007-12-28. The proxy will then convert this to 20081207.

Former Member
0 Kudos

Symptoms related to the process of converting a customization IT person to a Software Engineer. This is a learning curve dude, start think outside the box for survival.

Thanks

AndreasHuppert
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

as you can see from the pattern above, the web service expects the date in the format yyyy-mm-dd (with minus signs). The eight digit format yyyymmdd is only used internally after conversion by the proxy (also works in the other direction).

So the date needs to be sent to the web service with minus signs. Maybe this is your problem?

Regards

Andreas Huppert

Edited by: Andreas Huppert on Dec 27, 2007 1:43 PM