Author |
Message
|
PK |
Posted: Mon Feb 22, 2010 6:21 am Post subject: No output while parsing BLOB message to XMLNS message |
|
|
Novice
Joined: 22 Feb 2010 Posts: 12
|
Hi,
I am developing a webservice request - response flow . After SOAP input node I am attaching XMLNS message to Response by casting it into BLOB by the following code in compute node .Response is generated properly
[b]DECLARE performanceData BLOB ASBITSTREAM(InputRoot.XMLNS CCSID InputRoot.Properties.CodedCharSetId);[/b]
and after SOAP Request node when i am trying to pars the attachment to XMLNS by this code I am not getting the message.
DECLARE Response BLOB InputRoot.SOAP.Body.ns:performanceResponse.performanceData;
[b] CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNS') PARSE(Response CCSID InputRoot.Properties.CodedCharSetId);[/b]
I have tried with FolderBitStream as wel but Iam getting error at that time as
[b]An error has been reported by the BIPXML4C component
invalid document structure[/b]
Can you please help me out in resolving this
[/img] |
|
Back to top |
|
 |
kimbert |
Posted: Mon Feb 22, 2010 6:36 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
- Is the attachment in the reply message in the same code page as the attachment that was sent in the request? ( your code seems to assume that ).
- Any reason why you're using XMLNS, rather than XMLNSC?
Please post the full text of the error message. 'Invalid document structure' could mean a lot of things. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Feb 22, 2010 12:13 pm Post subject: Re: No output while parsing BLOB message to XMLNS message |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
PK wrote: |
Hi,
I am developing a webservice request - response flow . After SOAP input node I am attaching XMLNS message to Response by casting it into BLOB by the following code in compute node .Response is generated properly
DECLARE performanceData BLOB ASBITSTREAM(InputRoot.XMLNS CCSID InputRoot.Properties.CodedCharSetId);
and after SOAP Request node when i am trying to pars the attachment to XMLNS by this code I am not getting the message.
DECLARE Response BLOB InputRoot.SOAP.Body.ns:performanceResponse.performanceData;
CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNS') PARSE(Response CCSID InputRoot.Properties.CodedCharSetId);
I have tried with FolderBitStream as well but Iam getting error at that time as
An error has been reported by the BIPXML4C component
invalid document structure
Can you please help me out in resolving this
[/img] |
PK, Before using the CREATE, PARSE you need to create the parser type node. So in the Tree hierarchy you are one level too high for your command.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Feb 22, 2010 1:53 pm Post subject: Re: No output while parsing BLOB message to XMLNS message |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
fjb_saper wrote: |
PK, Before using the CREATE, PARSE you need to create the parser type node. So in the Tree hierarchy you are one level too high for your command. |
The CREATE Field command will do that...
I suspect there's a missing namespace on performanceData and maybe a place or two else.
And I also agree with kimbert that there's no reason to use XMLNS at all. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Feb 22, 2010 8:52 pm Post subject: Re: No output while parsing BLOB message to XMLNS message |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mqjeff wrote: |
fjb_saper wrote: |
PK, Before using the CREATE, PARSE you need to create the parser type node. So in the Tree hierarchy you are one level too high for your command. |
The CREATE Field command will do that...
|
PK wrote: |
DECLARE Response BLOB InputRoot.SOAP.Body.ns:performanceResponse.performanceData;
CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNS') PARSE(Response CCSID InputRoot.Properties.CodedCharSetId); |
Jeff can you please elaborate a bit?
The create command I would have expected would have been something like:
Code: |
CREATE LASTCHILD OF OutputRoot.XMLNSC PARSE (Response CCSID InputRoot.Properties.CodedCharSetId); |
The data being supplied is a folderbitstream yes? How does that work with creating the Parser domain at the same time? see last child of OutputRoot...?
Thanks for your understanding, I'm not quite sure how that works there.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
PK |
Posted: Mon Feb 22, 2010 10:19 pm Post subject: |
|
|
Novice
Joined: 22 Feb 2010 Posts: 12
|
Hi,
Thanks for your response actually I have tried by not creating the PARSER type node before parsing it worked successfully . I dont have any particular reason behind using XMLNS I have changed to XMLNSC. However I have found out the error . that is actually the proper SOAP tree is not getting created when I am getting the response from SOAPRequest node.
as SOAP service flow is like
SOAPInput --> SubFlow -->SOAPReply
Subflow have
Input --> MQGET --> Compute --> Output
In compute node I am creating the response message attaching XMLNSC message received from MQGET to BLOB and proper structure getting created . but I cunt find the proper envelope in it .Is that that problem? If yes how to resolve it.
I am geting teh following error from SOAP Request node
[b]problem creating SOAP tree from bitstream[/b]
while creating request I am using the below code
SET OutputRoot.SOAP.Body.ns:performanceRequest.projectId = InputRoot.XMLNSC.Request.projectId;
SET OutputRoot.SOAP.Body.ns:performanceRequest.startDate = InputRoot.XMLNSC.Request.startDate;
SET OutputRoot.SOAP.Body.ns:performanceRequest.endDate = InputRoot.XMLNSC.Request.endDate;
And while creating the Response I am giving writing this code
CALL CopyMessageHeaders();
DECLARE ccsid INTEGER InputProperties.CodedCharSetId;
DECLARE performanceData BLOB ASBITSTREAM(InputRoot.XMLNS CCSID InputProperties.CodedCharSetId);
--SET OutputRoot.SOAP.Context = InputRoot.SOAP.Context;
SET OutputRoot.SOAP.Body.ns:performanceResponse.performanceData = performanceData; |
|
Back to top |
|
 |
PK |
Posted: Mon Feb 22, 2010 10:20 pm Post subject: |
|
|
Novice
Joined: 22 Feb 2010 Posts: 12
|
sorry the response code is actually
CALL CopyMessageHeaders();
DECLARE ccsid INTEGER InputProperties.CodedCharSetId;
DECLARE performanceData BLOB ASBITSTREAM(InputRoot.XMLNSC CCSID InputProperties.CodedCharSetId);
--SET OutputRoot.SOAP.Context = InputRoot.SOAP.Context;
SET OutputRoot.SOAP.Body.ns:performanceResponse.performanceData = performanceData; |
|
Back to top |
|
 |
kimbert |
Posted: Tue Feb 23, 2010 1:01 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
In compute node I am creating the response message attaching XMLNSC message received from MQGET to BLOB and proper structure getting created |
So you are doing this:
a) getting an MQ message using the MQGet node
b) parsing it using the XMLNSC parser
c) turning it back into a BLOB using the XMLNSC parser
d) storing the resulting BLOB in the outgoing message.
I think it would be simpler and more efficient to set the Domain on the MQGet node to 'BLOB', and avoid steps b) and c).
If you really need to parse the message, you can parse the BLOB using a CREATE...PARSE statement. Even then, you have avoided the CPU cost of the ASBITSTREAM statement. |
|
Back to top |
|
 |
PK |
Posted: Tue Feb 23, 2010 3:36 am Post subject: |
|
|
Novice
Joined: 22 Feb 2010 Posts: 12
|
hey,
Thanks for your advice . I have changed the domain of MQGet to BLOB but doing that he SOAP tree is not getting created properly
presently
I have done the following in compute node after MQGet and the message is getting propperly parsed and I am getting proper message as Response in Environment.Response.XMLNSC.Data... as well as response from SOAPRequest node
CALL CopyMessageHeaders();
DECLARE ccsid INTEGER InputProperties.CodedCharSetId;
DECLARE encode INTEGER InputProperties.Encoding;
DECLARE performanceData BLOB ASBITSTREAM (InputRoot.XMLNSC ENCODING InputProperties.Encoding CCSID InputProperties.CodedCharSetId OPTIONS FolderBitStream);
SET OutputRoot.SOAP.Context = Environment.envelope;
SET OutputRoot.SOAP.Body.ns:performanceResponse.performanceData = performanceData;
CREATE FIELD Environment.Response TYPE Name;
CREATE LASTCHILD OF Environment.Response DOMAIN('XMLNSC') PARSE(performanceData ENCODING InputProperties.Encoding CCSID InputProperties.CodedCharSetId OPTIONS FolderBitStream);
when I am trying to parse that message in the same way in a compute node after SOAPRequest node
CALL CopyMessageHeaders();
DECLARE query CHARACTER;
DECLARE I INTEGER 1;
DECLARE J INTEGER ;
DECLARE ccsid INTEGER InputProperties.CodedCharSetId;
DECLARE encoding INTEGER InputProperties.Encoding;
DECLARE Response BLOB InputRoot.SOAP.Body.ns:performanceResponse.performanceData;
CREATE FIELD Environment.XMLNSC.Response TYPE Name;
CREATE LASTCHILD OF Environment.XMLNSC.Response PARSE(Response CCSID InputProperties.CodedCharSetId);
I am getting teh following message structure .
I really donno why its not working .Can anyone tell me
Environment
Response
XMLNSC
CHARACTER:XML Parsing Errors have occurred |
|
Back to top |
|
 |
kimbert |
Posted: Tue Feb 23, 2010 4:15 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I am getting teh following message structure .
I really donno why its not working .Can anyone tell me
Environment
Response
XMLNSC
CHARACTER:XML Parsing Errors have occurred |
That's not a 'message structure'. It is the result of a parsing error which occurred while the debugger was connected. Please do the following:
- disconnect the debugger
- add one or more Trace nodes to your flow with pattern set to '${Root}'
- take a user trace
This is a known defect in the debugger, and there may even be a fix available. Unless/until you get the problem fixed, don't use the debugger for diagnosing parsing/writing problems. ( it's very useful for other types of problem, though). |
|
Back to top |
|
 |
PK |
Posted: Tue Feb 23, 2010 4:59 am Post subject: |
|
|
Novice
Joined: 22 Feb 2010 Posts: 12
|
the message output for he SOAP service where response is getting created is
(0x01000000:Name):Response = (
(0x01000000:Folder):XMLNSC = ( ['xmlnsc' : 0xb0a478]
(0x01000000:Folder):Performance = (
(0x01000000:Folder):Data = (
(0x03000000:PCDataField):ProjectId = '1234' (CHARACTER)
(0x03000000:PCDataField):DataSetId = '111' (CHARACTER)
(0x03000000:PCDataField):StatusCode = '111' (CHARACTER)
(0x03000000:PCDataField):StatusDesc = 'perform1' (CHARACTER)
)
(0x01000000:Folder):Data = (
(0x03000000:PCDataField):ProjectId = '1234' (CHARACTER)
(0x03000000:PCDataField):DataSetId = '222' (CHARACTER)
(0x03000000:PCDataField):StatusCode = '222' (CHARACTER)
(0x03000000:PCDataField):StatusDesc = 'perform2' (CHARACTER)
)
But while parsing the SOAP response after SOAPRequest node I am getting
( ['MQROOT' : 0x2d24288]
(0x01000000:Name):XMLNSC = (
(0x01000000:Name):Response = (
(0x01000000:Name):Root = ( ['MQROOT' : 0x6d0be88]
(0x01000000:Name):Properties = ( ['MQPROPERTYPARSER' : 0x2d0d5b0]
(0x03000000:NameValue):MessageSet = NULL
(0x03000000:NameValue):MessageType = NULL
(0x03000000:NameValue):MessageFormat = NULL
(0x03000000:NameValue):Encoding = NULL
(0x03000000:NameValue):CodedCharSetId = NULL
(0x03000000:NameValue):Transactional = NULL
(0x03000000:NameValue):Persistence = NULL
(0x03000000:NameValue):CreationTime = NULL
(0x03000000:NameValue):ExpirationTime = NULL
(0x03000000:NameValue):Priority = NULL
(0x03000000:NameValue):ReplyIdentifier = NULL
(0x03000000:NameValue):ReplyProtocol = 'MQ' (CHARACTER)
(0x03000000:NameValue):Topic = NULL
(0x03000000:NameValue):ContentType = NULL
(0x03000000:NameValue):IdentitySourceType = NULL
(0x03000000:NameValue):IdentitySourceToken = NULL
(0x03000000:NameValue):IdentitySourcePassword = NULL
(0x03000000:NameValue):IdentitySourceIssuedBy = NULL
(0x03000000:NameValue):IdentityMappedType = NULL
(0x03000000:NameValue):IdentityMappedToken = NULL
(0x03000000:NameValue):IdentityMappedPassword = NULL
(0x03000000:NameValue):IdentityMappedIssuedBy = NULL
)
(0x01000000:Name):MQMD = |
|
Back to top |
|
 |
|