ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Creating xsi:type in SOAP message

Post new topic  This topic is locked: you cannot edit posts or make replies.
 Creating xsi:type in SOAP message « View previous topic :: View next topic » 
Author Message
GeneRK4
PostPosted: Mon Jan 05, 2015 8:02 am    Post subject: Creating xsi:type in SOAP message Reply with quote

Master

Joined: 08 Jul 2013
Posts: 220

I tried to achieve xsi:type to form a SOAP message as below(msg snippet),
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:enterprise.soap.sforce.com" xmlns:urn1="urn:sobject.enterprise.soap.sforce.com">
<soapenv:Body>
<urn:upsert> <urn:externalIDFieldName>Vacancy_Reference__c</urn:externalIDFieldName> <urn:sObjects xsi:type="urn1:Requisition__c">
<urn1:Id xsi:nil="true" />
<urn1:Car_Allowance__c>Fleet Car</urn1:Car_Allowance__c>


Both namespace declaration and context not working for me.

As Namespace declaration:
SET OutputRoot.SOAP.Body.(XMLNSC.NamespaceDecl)xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance';
SET OutputRoot.SOAP.Body.(XMLNSC.NamespaceDecl)xmlns:ns_tar='urn:sobject.enterprise.soap.sforce.com';
SET OutputRoot.SOAP.Body.(XMLNSC.NamespaceDecl)xmlns:ns='urn:enterprise.soap.sforce.com';
SET OutputRoot.SOAP.Body.ns:upsert.ns:sObjects.(XMLNSC.Attribute)xsi:type='ns_tar:Requisition__c';
---- SET refOut.ns_tar:Id='1';

SET OutputRoot.SOAP.Body.ns:upsert.ns:sObjects.ns_tar:Car_Allowance__c= SUBSTRING(refIn.*:Requisition.*:"Company_Car" FROM 1 FOR 20);
SET refOut.ns_tar:Vacancy_Reference__c = refIn.*:Requisition.*:Auto_reqID;

===============================================

As Context:
SET OutputRoot.SOAP.Context.Namespace.(SOAP.NamespaceDecl)xmlns:xsi = xsi;
SET OutputRoot.SOAP.Context.Namespace.(SOAP.NamespaceDecl)xmlns:soap_ns = soap_ns;
SET OutputRoot.SOAP.Context.Namespace.(SOAP.NamespaceDecl)xmlns:ns = ns;
SET OutputRoot.SOAP.Context.Namespace.(SOAP.NamespaceDecl)xmlns:ns_tar = ns_tar;

SET OutputRoot.SOAP.Body.ns:upsert.ns:sObjects.ns_tar:Car_Allowance__c= SUBSTRING(refIn.*:Requisition.*:"Company_Car" FROM 1 FOR 20);

Both the tries are throwing error as below,
XML schema validation error: cvc-complex-type.2.4.e: Unexpected element. Element "ns_tar:Car_Allowance__c" is not one of the choices. Element: /XMLNSC Internal error codes: 5008

Kindly help me on this...
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jan 05, 2015 9:21 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Locked as dup
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  This topic is locked: you cannot edit posts or make replies. Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Creating xsi:type in SOAP message
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.