tWebService component - NullPointerException - createPropertyMapper - web-services

I've a problem with the tWebService Talend component, impossible for me to find a solution
My Job
I have many WS to call in my job. I can call and get response with one simple WS (2 String param, and 2 String response)
But, for an other WS, more complex (String and Object param, and String and Object response), the tWebService failed. It looks the WS is not call, the problem seems to be Talend. But the MapperFactory failed to createPropertyMapper. My aim for moment is just to call the WS with static parameters and log the response with tLogRow component
Stacktrace
Exception in component tWebService_9
java.lang.NullPointerException
at org.talend.webservice.mapper.MapperFactory.createPropertyMapper(MapperFactory.java:406)
at org.talend.webservice.mapper.MapperFactory.createComplexTypeMapper(MapperFactory.java:339)
at org.talend.webservice.mapper.MapperFactory.createTypeMapper(MapperFactory.java:220)
at org.talend.webservice.mapper.MapperFactory.createPropertyMapper(MapperFactory.java:423)
at org.talend.webservice.mapper.MapperFactory.createComplexTypeMapper(MapperFactory.java:339)
at org.talend.webservice.mapper.MapperFactory.createTypeMapper(MapperFactory.java:220)
at org.talend.webservice.mapper.MapperFactory.createPropertyMapper(MapperFactory.java:423)
at org.talend.webservice.mapper.MapperFactory.createComplexTypeMapper(MapperFactory.java:339)
at org.talend.webservice.mapper.MapperFactory.createTypeMapper(MapperFactory.java:220)
at org.talend.webservice.mapper.MapperFactory.createPropertyMapper(MapperFactory.java:423)
at org.talend.webservice.mapper.MapperFactory.createComplexTypeMapper(MapperFactory.java:339)
at org.talend.webservice.mapper.MapperFactory.createTypeMapper(MapperFactory.java:220)
at org.talend.webservice.mapper.MapperFactory.createMessageMapper(MapperFactory.java:208)
at org.talend.webservice.helper.ServiceInvokerHelper.createMessageMapper(ServiceInvokerHelper.java:165)
at org.talend.webservice.helper.ServiceInvokerHelper.getMessageMapper(ServiceInvokerHelper.java:157)
at org.talend.webservice.helper.ServiceInvokerHelper.invoke(ServiceInvokerHelper.java:184)
at org.talend.webservice.helper.ServiceInvokerHelper.invoke(ServiceInvokerHelper.java:237)
at ipad.test_0_1.test.tWebService_9Process(test.java:573)
at ipad.test_0_1.test.runJobInTOS(test.java:921)
at ipad.test_0_1.test.main(test.java:786)
If anybody can help me, I'll be so grateful !
Thanks in advance

Related

Web Service authorization issue

Need some help with KDSoap 1.7 or gSOAP
I'm trying to use some Web Service API: http://sparkgatetest.interfax.ru/iFaxWebService/ . There is list of methods and to interact with them u must:
call Authmethod
call any method u need to
call End
Problem is, this is HTTP protocol, so if you used Authmothod succesfully, and after that trying to call methods which return some information, u got an "Authorization error" message in xml response.
So, to correct usage of this API u should call three methods (Authmethod, some method, End) in one request. How should I do it with KDSoap/gSOAP?
p.s. i found setAuthentication function in client interface, but it takes KDSoapAuthentication class as argument, maybe there is a way to customize it? And End method also a big problem aswell.

SOAP:1.027 SRT: Serialization / Deserialization failed in ABAP Proxy

I have to create a consumer proxy in SAP, the proxy generation is OK (or no errors were reported), but when i tried yo consume the proxy (SE80), i have the next error:
SOAP:1.027 SRT: Serialization / Deserialization failed
System expected a value for the type g.
If i continue, i have the response, but when i tried to call the customer service in a report, i have the error and i can't continue.
In a report, when i tried yo consume the proxy using this code, i have the same error, and i don't have response:
CREATE OBJECT proxy
EXPORTING
logical_port_name = 'LOGICAL_01'.
CALL METHOD proxy->proccess_check_status_invoice
EXPORTING
process_check_status_invoice = input
IMPORTING
process_check_status_invoice_r = output.
Whow can i solve this error?
Thanks,
Please use srt_util and verify the execution error with a trace of that proxy. The error log will specify which field and values are not allowed during the transformation.
SOAP:1.027 SRT: Serialization / Deserialization failed errors are due to incompatible data types, in my experience, most of the times are dates since ABAP datum and the standard differ and must be transformed.
Type g is usually the constant for the TYPEKIND of STRING. My guess is you are binding values that are CHARs instead of the STRING datatype.

WSO2 AS 5.2.1. Servlet Exception while making the decision : java.lang.NullPointerException

i was actual trying this tutorial: http://wso2.com/library/tutorials/2012/12/providing-xacml-fine-grained-authorization-webapps/
on the authentication with admin:admin on localhost:9763/Entitlement_Sample_WebApp/protected.jsp i encountered an error:
exception
org.wso2.carbon.identity.entitlement.filter.exception.EntitlementFilterException: Exception while making the decision : java.lang.NullPointerException
org.wso2.carbon.identity.entitlement.filter.EntitlementFilter.doFilter(EntitlementFilter.java:191)
My WSO2 IS PDP receives the request and responds also correctly with a XACML Response : Permit
so where could be the problem ??
thank you
The problem caused by an error of EntitlementFilter, so I could solve this by correcting the source file EntitlementFilter.java (line 191)
like below:
simpleDecision = decisionElement.getFirstChildWithName(new QName("Result")).getFirstChildWithName(new QName("Decision")).getText();
rewrite it:
simpleDecision = decisionElement.getFirstChildWithName(new QName(“urn:oasis:names:tc:xacml:3.0:core:schema:wd-17″,”Result”)).
getFirstChildWithName(new QName(“urn:oasis:names:tc:xacml:3.0:core:schema:wd-17″,”Decision”)).getText();
It ommitted namespace in QName method
The detail is here (https://nparkstar.wordpress.com/2015/01/27/wso2-as-sample-authorization-%EC%98%A4%EB%A5%98-%EC%88%98%EC%A0%95/).
Sorry, it is written in Korean, but I wish it could helpful.
It could be anywhere starting from this line : pepProxy.getDecision(userName, resource, action, env)
It could be in your pepProxy code, where they are getting back the result, or might be in the other lines after this call in that try catch.
One thing is sure PDP is not at all culprit.
Please paste your full exception here if you want to know precise problem + Solution.
:)

Webport Issus with webmessage and multippart messages

I'm having an issue while creating orchestration by consuming webservice
Web message response variable name - msgReponse.webserviceResponse
multipart message response variable name - msgResponse.multipartresponse
I'm receiving the webmessage type(msgwebserviceResponse.Respone) from the webport.
Then after receive shape, I'm trying to map that response with another message.
So, here when I try map them by using the transfer shape, When I want to select msgResponse.multipartresponse as input schema for the map, I'm seeing msgResponse.multipartresponse(I can't see this, as I'm recieving msgReponse.webserviceResponse at receive shape)
could you please help me on this?
Thank You,
I had similar problems with yours. Asked a question and got an answer. Check this.

How do I debug mangled soap requests?

Lately, we've been seeing exceptions like this in our .NET (.asmx) webservices:
System.Web.Services.Protocols.SoapException: Server was unable to read request. ---> System.InvalidOperationException: There is an error in XML document (868, -3932). ---> System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 868, position -3932.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Int32 pos, Char invChar)
at System.Xml.XmlTextReaderImpl.ParseNumericCharRefInline(Int32 startPos, Boolean expand, BufferBuilder internalSubsetBuilder, Int32& charCount, EntityType& entityType)
at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
at System.Xml.XmlTextReaderImpl.ParseText()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at System.Web.Services.Protocols.SoapServerProtocol.SoapEnvelopeReader.Read()
at System.Xml.XmlReader.ReadElementString()
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read14_SendErrlog()
at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer12.Deserialize(XmlSerializationReader reader)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
--- End of inner exception stack trace ---
at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
How can I debug this exception? This exception is getting reported to us from a SOAP filter which looks for exceptions in message.Stage = SoapMessageStage.AfterSerialize.
Is there any way to get at the original soap request? How do I get an invalid character at line 868, column -3932? How can there a negative column 3932?
This is one of the irritating things about the Microsoft web services approach -- if the request cannot be deserialized into the objects in your web method signature then the service consumer gets a cryptic message. And to top it off, the request never makes it into your web service because it cannot be deserialzied so you can't handle the error gracefully.
What I would do to help with these types of issues is to create a new SoapExtension that simply lets you output the raw XML to a destination that is convenient for you (file or Trace to be read by DebugView or whatever else you like). The code would go in the BeforeDeserialize stage. You could enable the SoapExtension via web.config in the event you wanted to investigate one of these issues. The downside of using the web.config to add the SoapExtension is that it will be active for the entire web application. You could add some additional custom configuration that would allow your service to only log information for a specific endpoint or a specific web method if you wanted.
Usually, just by seeing the incoming XML you can see what the problem is. If not, then you could try to manually run the captured XML through small program that invokes the XML serializer and see if you can find out what is going on. Another useful tool is Web Service Studio 2 which is a test harness which lets you enter data and invoke your service (and also submit any XML you want).
In terms of your specific issue, here is my take/guess. It looks like ASCII character null is getting encoded and sent to your service which is invalid according to the XML Spec. The simple answer is not to send that character. But who is sending that character? Is it a .NET client? Do you have control over the client? If you need to work around someone else's bug, then you may have to replace the offending character(s) with another character (perhaps empty string).
You should be able to get the original message by using another SoapExtension. In fact, the same extension could probably be modified to make a copy of the input, and to discard it if there is no exception. The original input would then be available to you if an exception occurred.
You could also use an external tool like Fiddler to watch what's being sent to you.
FYI: SoapException.Message is intentionally left vague to prevent exposing too much information which could potentially be used to exploit the system.
For your particular case I'd take John's advice and install Fiddler to monitor the actual HTTP traffic and view the message on the wire.
The portion of your exception that jumps out at me is the "hexadecimal value 0x00, is an invalid character" but as you mentioned the line number it points to is bunk--so it's nothing concrete.
What kind of parameters do you pass to the service? Are you doing any kind of custom encoding with a SOAP extension? Any additional SOAP headers being added?