[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Sun producer throwing NPE when UserContext is nil?
Hi, it seems that the sun producer throws a NPE if we pass a nil UserContext (which is allowed by the spec, i.e. WSDL). Tested on the bookmark Portlet. I have two request, where I think the difference seems to be only the UserContext, in the first case it works in the second not. But it's just a guess... Working request: ?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <getMarkup xmlns="urn:oasis:names:tc:wsrp:v1:types"> <registrationContext> <registrationHandle>S0BC1CAAAAAAHQASGFQQAAA</registrationHandle> </registrationContext> <portletContext> <portletHandle>BookmarkPortlet</portletHandle> </portletContext> <runtimeContext> <userAuthentication>wsrp:none</userAuthentication> <portletInstanceKey>7_0_JE</portletInstanceKey> <namespacePrefix>wsrp_rewrite_</namespacePrefix> <templates> cut by RJ due to readability </templates> </runtimeContext> <userContext> <userContextKey>wpsadmin</userContextKey> <profile> <name> <given>Richard</given> <family>Jacob</family> </name> <homeInfo> <postal> <name>Richard Jacob</name> </postal> <online> <email>richard.jacob@de.ibm.com</email> </online> </homeInfo> <businessInfo> <postal> <name>Richard Jacob</name> </postal> <online> <email>richard.jacob@de.ibm.com</email> </online> </businessInfo> </profile> </userContext> <markupParams> <secureClientCommunication xsi:type="soapenc:boolean">0</secureClientCommunication> <locales>en</locales> <mimeTypes>text/html</mimeTypes> <mode>wsrp:view</mode> <windowState>wsrp:normal</windowState> <clientData> <userAgent>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113</userAgent> </clientData> <markupCharacterSets>UTF-8</markupCharacterSets> <validNewModes>wsrp:edit</validNewModes> <validNewModes>wsrp:view</validNewModes> <validNewModes>wsrp:help</validNewModes> <validNewWindowStates>wsrp:normal</validNewWindowStates> <validNewWindowStates>wsrp:maximized</validNewWindowStates> <validNewWindowStates>wsrp:minimized</validNewWindowStates> </markupParams> </getMarkup> </soapenv:Body> </soapenv:Envelope> Not working request: <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <getMarkup xmlns="urn:oasis:names:tc:wsrp:v1:types"> <registrationContext> <registrationHandle>S0BC1CAAAAAAHQASGFQQAAA</registrationHandle> </registrationContext> <portletContext> <portletHandle>BookmarkPortlet</portletHandle> </portletContext> <runtimeContext> <userAuthentication>wsrp:none</userAuthentication> <portletInstanceKey>7_0_JE</portletInstanceKey> <namespacePrefix>wsrp_rewrite_</namespacePrefix> <templates> cut by RJ due to readability </templates> </runtimeContext> <userContext xsi:nil="true"/> <markupParams> <secureClientCommunication xsi:type="soapenc:boolean">0</secureClientCommunication> <locales>en</locales> <mimeTypes>text/html</mimeTypes> <mode>wsrp:view</mode> <windowState>wsrp:normal</windowState> <clientData> <userAgent>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)</userAgent> </clientData> <markupCharacterSets>UTF-8</markupCharacterSets> <validNewModes>wsrp:edit</validNewModes> <validNewModes>wsrp:view</validNewModes> <validNewModes>wsrp:help</validNewModes> <validNewWindowStates>wsrp:normal</validNewWindowStates> <validNewWindowStates>wsrp:maximized</validNewWindowStates> <validNewWindowStates>wsrp:minimized</validNewWindowStates> </markupParams> </getMarkup> </soapenv:Body> </soapenv:Envelope> The failed response is: <?xml version="1.0" encoding="UTF-8"?> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="urn:oasis:names:tc:wsrp:v1:types"> <env:Body> <env:Fault> <faultcode>env:Server</faultcode> <faultstring>JAXRPC.TIE.04: Internal Server Error (JAXRPC.TIE.01: caught exception while handling request: java.lang.NullPointerException)</faultstring> </env:Fault> </env:Body> </env:Envelope> Mit freundlichen Gruessen / best regards, Richard Jacob ______________________________________________________ IBM Lab Boeblingen, Germany Dept.8288, WebSphere Portal Server Development Phone: ++49 7031 16-3469 - Fax: ++49 7031 16-4888 Email: mailto:richard.jacob@de.ibm.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]