Skip to Content
avatar image
Former Member

Error in consuming WorkCentreSimpleByPlantQueryResponse_In ES

Hi,

I`m consuming the Enterprise Service [Find Work Centre by Plant|http://esworkplace.sap.com/socoview(bD1lbiZjPTAwMSZkPW1pbg==)/render.asp?packageid=DE0426DD9B0249F19515001A64D3F462&id=DDF713F2F5F911DA2B24000F20DAC9EF] in Web Dynpro application from ES Workplace, like the sample [Assign Work Centre to Service Request|http://esworkplace.sap.com/socoview(bD1lbiZjPTAwMSZkPW1pbg==)/render.asp?packageid=DE0426DD9B0249F19515001A64D3F462&id=238D404B61C0480D8CEBC1C01F8283EA], and when I call the webservice with the input parameter WorkCentrePlantID = 1200, it returns:

<?xml version="1.0" encoding="utf-8"?>

http://schemas.xmlsoap.org/soap/envelope/">

<soap-env:Header/>

<soap-env:Body>

<n0:WorkCentreSimpleByPlantResponse_sync

xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"

xmlns:prx="urn:sap.com:proxy:HU2:/1SAI/TAS0E4F7FCEFE3C246D20ED:701:2008/06/06">

<WorkCentre>

<ID>L-1000</ID>

<PlantID>1200</PlantID>

<Description>

<WorkCentreDescription languageCode="E">Line 1000</WorkCentreDescription>

</Description>

</WorkCentre>

<WorkCentre>

<ID>L-2000</ID>

<PlantID>1200</PlantID>

<Description>

<WorkCentreDescription languageCode="E">Line 2000</WorkCentreDescription>

</Description>

</WorkCentre>

..................................

..................................

<Log/>

</n0:WorkCentreSimpleByPlantResponse_sync>

</soap-env:Body>

</soap-env:Envelope>

Then, throw an error in when I execute the application . The error we receive is:

Caused by: com.sap.dictionary.runtime.DdCheckException: Value E is too short; enter a value that has more than 2 characters

at com.sap.dictionary.runtime.DdTypeString.checkValid(DdTypeString.java:291)

at com.sap.tc.cm.base.model.BaseGenericModelClass.setAttributeValue(BaseGenericModelClass.java:324)

... 99 more

I found the cause of this exception: in the WSDL file, the minLength of the simple type "LanguageCode" is "2", but the webservice is returning only one character, the letter "E":

WSDL:

<xsd:simpleType name="LanguageCode">

<xsd:restriction base="xsd:language">

<xsd:maxLength value="9" />

<xsd:minLength value="2" />

</xsd:restriction>

</xsd:simpleType>

XML:

<WorkCentreDescription languageCode="E">Line 1000</WorkCentreDescription>

What`s the problem: the WSDL is wrong OR the data return (languageCode) is wrong?

Your help will be highly appreciated.

Thanks and Regards

Fabiano Rosa

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    May 08, 2009 at 11:46 AM

    Dear Fabiano,

    it seems that you discovered an error in the WorkCentreSimpleByPlant enterprise service. Indeed the return value should be "EN". I forwarded this to our development, they are working on a fix.

    Thank you for bringing this to our attention.

    Best regards

    Volker

    Add comment
    10|10000 characters needed characters exceeded