cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Service Now problem
Date Fri, 17 Jul 2015 17:20:34 GMT

> On Jul 17, 2015, at 1:01 PM, Talkov, Roger <Roger.Talkov@automic.com> wrote:
> 
> I’m seeing a problem with CXF and Service Now.
> I send a request with a SOAP Body of:
>  
>     <ns2:getKeys xmlns:ns2="http://www.service-now.com/incident">
>       <active>false</active>
>     </ns2:getKeys>
>  
> And get a response with a Body of:
>  
>     <getKeysResponse>
>       <sys_id/>
>       <count>0</count>
>     </getKeysResponse>
>  
> I get an error which I think is due to the request having a namespace but the response
doesn’t:

Yep.   That response is not valid.  It’s really a bug in their service.   Might be worth
reporting to them.


You may be able to use CXF’s transformation feature (http://cxf.apache.org/docs/transformationfeature.html
) to have it rewrite the response to include the namespace.   Definitely more involved than
you were likely planning though.  :(

Dan


>  
> org.apache.cxf.interceptor.Fault: Unexpected wrapper element getKeysResponse found. 
 Expected {http://www.service-now.com/incident}getKeysResponse. The error message mentions
the request, but this doesn’t seem right as I get a response and the error doesn’t happen
till after the response is received
>  
> I’m using the dynamic client, I also ran wsdl2java and have attached the output of
the relevant files
>  
> Full interceptor output:
>  
> 07/17/15 09:32:37.259 sn1_2: LoggingOutInterceptorCXF: Outbound Message
> ---------------------------
> ID: 1
> Address: https://uc4.service-now.com/incident.do?SOAP
> Encoding: UTF-8
> Http-Method: POST
> Content-Type: text/xml
> Headers: {Accept=[*/*], SOAPAction=["http://www.service-now.com/incident/getKeys"]}
> Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>     <ns2:getKeys xmlns:ns2="http://www.service-now.com/incident">
>       <active>false</active>
>     </ns2:getKeys>
>   </soap:Body>
> </soap:Envelope>
>  
> --------------------------------------
> 07/17/15 09:32:57.534 sn1_2: LoggingInInterceptorCXF: Inbound Message
> ----------------------------
> ID: 1
> Response-Code: 200
> Encoding: UTF-8
> Content-Type: text/xml;charset=UTF-8
> Headers: {Cache-control=[no-cache,no-store,must-revalidate,max-age=-1], content-type=[text/xml;charset=UTF-8],
Date=[Fri, 17 Jul 2015 16:32:56 GMT], Expires=[0], Pragma=[no-store,no-cache], Server=[ServiceNow],
Set-Cookie=[BIGipServerpool_uc4=528483850.42302.0000; path=/, glide_user_route=glide.f687c7d0c68933ab87cd9cbb7fd6683c;secure;
Expires=Wed, 04-Aug-2083 19:46:44 GMT; Path=/; HttpOnly, glide_user_session="U0N2MjozOTJmMzFmZDRmZDk4YTQwOGM1MTk3NDExMzEwYzcxYw==";
Version=1; HttpOnly, glide_user="U0N2MjozOTJmMzFmZDRmZDk4YTQwOGM1MTk3NDExMzEwYzcxYw=="; Version=1;
Max-Age=2147483647; Expires=Wed, 04-Aug-2083 19:46:44 GMT; HttpOnly, glide_user_session="";secure;
Expires=Thu, 01-Jan-1970 00:00:10 GMT; HttpOnly, glide_user="";secure; Expires=Thu, 01-Jan-1970
00:00:10 GMT; HttpOnly, JSESSIONID=BACDDDF64513246338E733AB9C7EDB66;Secure; Path=/; HttpOnly],
transfer-encoding=[chunked], X-TRANSACTION-TIME=[0:00:19.827], X-TRANSACTION-TIME-MS=[19827]}
> Payload: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>   <SOAP-ENV:Body>
>     <getKeysResponse>
>       <sys_id/>
>       <count>0</count>
>     </getKeysResponse>
>   </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>  
> --------------------------------------
> ErrorMsg: Error building request object  (7/17/15 9:32 AM)
> Details: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <ns2:getKeys xmlns:ns2="http://www.service-now.com/incident">
>     <active>false</active>
> </ns2:getKeys>
>  
> org.apache.cxf.interceptor.Fault: Unexpected wrapper element getKeysResponse found. 
 Expected {http://www.service-now.com/incident}getKeysResponse.
>      at org.apache.cxf.wsdl.interceptors.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:106)
>      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
>      at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:802)
>      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1644)
>      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1533)
>      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1335)
>      at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:56)
>      at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:215)
>      at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
>      at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:651)
>      at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
>      at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:516)
> This email (including any attachments) may contain information which is privileged, confidential,
or protected. If you are not the intended recipient, note that any disclosure, copying, distribution,
or use of the contents of this message and attached files is prohibited. If you have received
this email in error, please notify the sender and delete this email and any attached files.
<incident.zip>

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Mime
View raw message