cancel
Showing results for 
Search instead for 
Did you mean: 

Namespace Issue Urgent!!!

Former Member
0 Kudos

Hi All,

I have Proxy to Web Service(SOAP) sync scenario.

I have imported the external definitions for DT at SAP end to map the response recived by Webserver the way it is (no mapping).

We have then created proxy for this external definition.

Now the issue is:

The response sent by Webserver is of the format:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<GetStudentsExResponse xmlns="http://tempuri.org/LMSWebSvc/LMS_Interface" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<GetStudentsExResult>

<Courses xmlns="">

<Warnings />

<Course CourseName="Requal RWT with Instructional Blocks TEST" CourseId="1325">

</Course>

</Courses>

</GetStudentsExResult>

</GetStudentsExResponse>

But the xsd that i have created expects the format as:

<n0:GetStudentsExResponse xmlns:n0="urn:sce-com:xi:hcm:CourseCompletionData" xmlns:prx="urn:sap.com:proxy:N02:/1SAI/TXS524054D59EE45F6DB1FF:700:2007/10/04">

<GetStudentsExResult>

<Courses>

<Warnings>This is a string 166</Warnings>

<Course CourseName="This is a string 247" CourseId="This is a string 248">

</Course>

</Courses>

</GetStudentsExResult>

</n0:GetStudentsExResponse>

and hence I am getting the error:

*@5C\QError@ System expected the element 'GetStudentsExResponse' *

I am sure this is Namespace issue.

Could some one pls tell me how i need to change my XSD so that I dont get this error

Here's my XSD:

<?xml version = "1.0" encoding = "ISO-8859-1"?>

<!Generated by Turbo XML 2.4.2.7. Conforms to w3c http://www.w3.org/2001/XMLSchema>

<xs:schema xmlns = "urn:sce-com:xi:hcm:CourseCompletionData"

targetNamespace = "urn:sce-com:xi:hcm:CourseCompletionData"

xmlns:xs = "http://www.w3.org/2001/XMLSchema">

<xs:element name = "GetStudentsExResponse">

<xs:complexType>

<xs:sequence>

<xs:element name = "GetStudentsExResult" type = "GetStudentsExResult" />

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:complexType name = "GetStudentsExResult">

<xs:sequence>

<xs:element name = "Courses" type = "Courses" />

</xs:sequence>

</xs:complexType>

<xs:complexType name = "Courses">

<xs:sequence>

<xs:element name = "Warnings" type = "xs:string" minOccurs = "0"/>

<xs:element name = "Course" type = "Course" minOccurs = "0" maxOccurs = "unbounded"/>

</xs:sequence>

</xs:complexType>

<xs:complexType name = "Course">

<xs:sequence>

<xs:element name = "Student" type = "Student" minOccurs = "0" maxOccurs = "unbounded"/>

</xs:sequence>

<xs:attribute name = "CourseName" use = "required" type = "xs:string"/>

<xs:attribute name = "CourseId" use = "required" type = "xs:NMTOKEN"/>

</xs:complexType>

<xs:complexType name = "ExamInteractions">

<xs:attribute name = "QuesNum" use = "required" type = "xs:NMTOKEN"/>

<xs:attribute name = "CorrectResp" use = "required">

<xs:simpleType>

<xs:restriction base = "xs:NMTOKEN">

<xs:enumeration value = "A"/>

<xs:enumeration value = "B"/>

<xs:enumeration value = "C"/>

<xs:enumeration value = "D"/>

<xs:enumeration value = "f"/>

<xs:enumeration value = "t"/>

</xs:restriction>

</xs:simpleType>

</xs:attribute>

<xs:attribute name = "Judged" use = "required">

<xs:simpleType>

<xs:restriction base = "xs:NMTOKEN">

<xs:enumeration value = "c"/>

<xs:enumeration value = "w"/>

</xs:restriction>

</xs:simpleType>

</xs:attribute>

<xs:attribute name = "StudentResp" use = "required">

<xs:simpleType>

<xs:restriction base = "xs:NMTOKEN">

<xs:enumeration value = "A"/>

<xs:enumeration value = "B"/>

<xs:enumeration value = "C"/>

<xs:enumeration value = "D"/>

<xs:enumeration value = "f"/>

<xs:enumeration value = "t"/>

</xs:restriction>

</xs:simpleType>

</xs:attribute>

</xs:complexType>

<xs:complexType name = "Lesson">

<xs:sequence>

<xs:element name = "ExamInteractions" type = "ExamInteractions" minOccurs = "0" maxOccurs = "unbounded"/>

</xs:sequence>

<xs:attribute name = "LessonName" use = "required" type = "xs:string"/>

<xs:attribute name = "ProctorID" type = "xs:NMTOKEN"/>

<xs:attribute name = "LessonCode" use = "required" type = "xs:NMTOKEN"/>

<xs:attribute name = "ProctorName" type = "xs:string"/>

<xs:attribute name = "LessonScore" type = "xs:NMTOKEN"/>

<xs:attribute name = "LessonStatusDate" type = "xs:string"/>

<xs:attribute name = "LessonStatus">

<xs:simpleType>

<xs:restriction base = "xs:NMTOKEN">

<xs:enumeration value = "c"/>

<xs:enumeration value = "f"/>

<xs:enumeration value = "i"/>

<xs:enumeration value = "p"/>

</xs:restriction>

</xs:simpleType>

</xs:attribute>

</xs:complexType>

<xs:complexType name = "Student">

<xs:sequence>

<xs:element name = "Lesson" type = "Lesson" minOccurs = "0" maxOccurs = "unbounded"/>

</xs:sequence>

<xs:attribute name = "CourseStatus" use = "required">

<xs:simpleType>

<xs:restriction base = "xs:NMTOKEN">

<xs:enumeration value = "C"/>

<xs:enumeration value = "F"/>

<xs:enumeration value = "P"/>

</xs:restriction>

</xs:simpleType>

</xs:attribute>

<xs:attribute name = "LoginID" use = "required" type = "xs:NMTOKEN"/>

<xs:attribute name = "CompanyName" use = "required" type = "xs:string"/>

<xs:attribute name = "CourseScore" use = "required" type = "xs:NMTOKEN"/>

<xs:attribute name = "LastName" use = "required" type = "xs:string"/>

<xs:attribute name = "SSN" type = "xs:NMTOKEN"/>

<xs:attribute name = "CourseStatusDate" use = "required" type = "xs:string"/>

<xs:attribute name = "FirstName" use = "required" type = "xs:string"/>

<xs:attribute name = "MiddleInitial" type = "xs:string"/>

<xs:attribute name = "AlternateID" type = "xs:NMTOKEN"/>

</xs:complexType>

</xs:schema>

Regards

XIer

Accepted Solutions (1)

Accepted Solutions (1)

former_member187563
Contributor
0 Kudos

hi,

NO need to change your XSD,Instead you can change your incoming message using XMLAnonymizerBean

you have to simply add one module in your communication channel

that is XMLAnonymizerBean

you can refer below for help:

/people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean

http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm

hope it helps.

reward point 4 useful ans.

regards,

ujjwal kumar

Answers (3)

Answers (3)

Former Member
0 Kudos

Self Resolved...

Former Member
0 Kudos

Hey

If you want to make some changes in XSD,then just export the xsd as a text file and then import it back in Integration repository

Thanx

Aamir

Former Member
0 Kudos

can u do a mapping (a 1 to 1) for the response though the strcuture is the same