Content-Type=application/x-www-form-urlencoded with UTF-8  data which servlet fails to interpret correctly .

My Environment is Weblogic 6.1 SP2 on WIN2K.
I have an HTTP client sending an HTTP request with
Content-Type=application/x-www-form-urlencoded
the data in HTTP request is in UTF-8. Note that HTTP client does not specify charset=UTF-8
as part of the Content-Type.
I have a servlet "VosXmlEvents" processing this HTTP request.
The HTTP request contains data like “Zoë” which the servlet below
interprets as “Zoë” causing me to think that my deployment settings
might be wrong.
My Deployment settings:
In weblogic.xml deployment descriptor I have specified following:
<charset-params>
<!-- I specified this so that I can tell to weblogic that HTTP request data is
UTF-8 so weblogic can successfully convert it to ISO-8859-1 as per Java servlet
spec.-->
<input-charset>
<resource-path>/vos/events/xml/*</resource-path>
<!-- I tried both UTF8 and UTF-8 and got same results-->
<java-charset-name>UTF8</java-charset-name>
</input-charset>
<!-- I specified the the settings below just to be on the safe side, as I have
seen java documentation, newsgroups etc. using slightly different, names for the
same char encoding/canonical names . Java uses MIME preferred names,I think I
dont have to do this but I hope specifying these should not do any harm either,
am I correct in assuming it? (see reference 1 and 2. below for details)-->
<charset-mapping>
<iana-charset-name>ISO_8859-1:1987</iana-charset-name>
<java-charset-name>ISO-8859-1</java-charset-name>
</charset-mapping>
<charset-mapping>
<iana-charset-name>ISO_8859-1:1987</iana-charset-name>
<java-charset-name>ISO8859_1</java-charset-name>
</charset-mapping>
<charset-mapping>
<iana-charset-name>UTF-8</iana-charset-name>
<java-charset-name>UTF-8</java-charset-name>
</charset-mapping>
<charset-mapping>
<iana-charset-name>UTF-8</iana-charset-name>
<java-charset-name>UTF8</java-charset-name>
</charset-mapping>
</charset-params>
My web.xml has:
<servlet>
<servlet-name>VosXmlEvents</servlet-name>
<servlet-class>some class name</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>VosXmlEvents</servlet-name>
<url-pattern>/vos/events/xml/*</url-pattern>
</servlet-mapping>
According to Servlet spec. 2.3 sec. SRV.4.9 Request data encoding, cut pasting
from spec below:
"Currently, many browsers do not send a char encoding qualifier with the Content-Type
header, leaving open the determination of the character encoding for reading HTTP
requests. The default encoding of a request the container uses to create the request
reader and parse POST data must be &#8220;ISO-8859-1&#8221;, if none has been
specified by the client request. However, in order to indicate to the developer
in this case the failure of the client to send a character encoding, the container
returns null from the getCharacterEncoding method.
If the client hasn&#8217;t set character encoding and the request data is encoded
with a different encoding than the default as described above, breakage can occur.
To remedy this situation, a new method setCharacterEncoding(String enc) has been
added to the ServletRequest interface. Developers can override the
character encoding supplied by the container by calling this method. It must be
called prior to parsing any post data or reading any input from the request. Calling
this method once data has been read will not affect the encoding."
Q1. Should not <input-charset> related settings in weblogic.xml for a servlet
helps container actually do some thing like setCharacterEncoding(String enc) on
HTTP Request before it call the servlet?
Q2. If not then that would mean I have to programatically call setCharacterEncoding(String
enc)to correctly interpret my HTTP Request?
Q3. If the answer to Q1 is "yes" then I will assume that getInputStream() or getReader()
methods on the HttpServletRequest will give the chacter in the client encoded
format which in this case is UTF-8, i.e I will get "Zoë" as in this example. Am
I correct here?
Reference:
1. http://edocs.bea.com/wls/docs70/webapp/components.html#139932
2. http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.html

Stefan,
Thanks for the information. I have the following question then.
The Webserver I am interacting with does not recognize user and password provided in the channel. It accepts user and pwd in payload and in application/x-www-form-urlencoded  content type only.
Sample Raw Post that server server requires looks like this
User=yourname&Password=yourpassword&INPUT_XML=%3C%3Fxmlversion%3D%221.0%22standalone%3D%22no%22%3F%3E%3CDELIVERY%3E%3CMESSAGE%3E%0D%0A++++%3CDESTINATION_ADDR%3E%2B447900570205%3C%2FDESTINATION_ADDR%3E%%3C%2FMESSAGE%3E%0D%0A%0D%0A%3C%2FDELIVERY%3E%
What i have done is that constructed the post manually in Java code in un encoded form and expected the HTTP Adapter to do the encoding. Having done this, the HTTP Server is able to scuccessfully parse the xml except for & and < , > chars which err out as invalid XML.
Is there an elegant way of doing above scenario using XML post and standard HTTP Adapter.
Best Regards,
Sudharshan N A

Similar Messages

  • SOAP Adapter with application/x-www-form-urlencoded

    You can use the content type "application/x-www-form-urlencoded" in a SOAP adapter?
    Thank you.

    I did the configuration below:
    "Here you have to use below configuration parameters for Module
    Transform.Class = com.sap.aii.messaging.adapter.Conversion
    Transform.ContentType = application / x-www-form-urlencoded "
    However, got the following error:
    =======================================================================================================
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Inbound Message
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.lang.ClassNotFoundException: com.sap.aii.messaging.adapter.Conversion -
    Loader Info -
    ClassLoader name: [sap.com/com.sap.aii.af.mod.trans.app] Living status: alive Direct parent loaders: [system:Frame] [service:servlet_jsp] [service:ejb] [library:engine.j2ee14.facade] [library:com.sap.base.technology.facade] [library:com.sap.aii.af.lib] [library:com.sap.aii.af.sdk.lib] [service:com.sap.aii.af.cpa.svc] [service:com.sap.aii.af.svc] [service:com.sap.aii.adapter.xi.svc] [library:com.sap.aii.adapter.lib] Resources: C:\usr\sap\PI1\DVEBMGS04\j2ee\cluster\apps\sap.com\com.sap.aii.af.mod.trans.app\EJBContainer\applicationjars\com.sap.aii.af.mod.trans.ejb.jar -
    </SAP:AdditionalText>
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    =======================================================================================================
    Any suggestion?
    Thank you.
    Regards,
    Bruno

  • Unsupported Content-Type: application/soap+xml

    I've created a simple composite application with a bpel jbi module using glassfishesbv21.
    The bpel process starts when I invoke a webservice (soap-binding).
    When I run a test case for the ca everything works fine.
    When I call the webservice from an external web application, the client (created with netbeans wizard bundled in glassfishesbv21) obtains the response as expected and doesn't report any exception while the server rises a com.sun.xml.ws.server.UnsupportedMediaException.
    Googoling I found that this maybe caused by the use of soap1.1 and soap1.2 but is also true that JAX-WS runtime should look into the WSDL to determine the binding being used and configures itself accordingly.
    the stacktrace is:
    Finished processing outbound messages.
    Request doesnt have a Content-Type
    com.sun.xml.ws.server.UnsupportedMediaException: Request doesnt have a Content-Type
    at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:267)
    at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:276)
    at com.sun.xml.ws.transport.http.HttpAdapter.invokeAsync(HttpAdapter.java:341)
    at com.sun.jbi.httpsoapbc.embedded.JAXWSGrizzlyRequestProcessor.processAsynchRequest(JAXWSGrizzlyRequestProcessor.java:386)
    at com.sun.jbi.httpsoapbc.embedded.JAXWSGrizzlyRequestProcessor.service(JAXWSGrizzlyRequestProcessor.java:220)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
    at com.sun.jbi.httpsoapbc.embedded.JBIGrizzlyAsyncFilter.doFilter(JBIGrizzlyAsyncFilter.java:95)
    at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:175)
    at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:153)
    at com.sun.enterprise.web.connector.grizzly.async.AsyncProcessorTask.doTask(AsyncProcessorTask.java:92)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
    Unsupported Content-Type: application/soap+xml Supported ones are: [text/xml]
    com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: application/soap+xml Supported ones are: [text/xml]
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:291)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:128)
    ====[com.sun.xml.ws.assembler.server:request]====
    <?xml version="1.0" ?>
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <soap-env:Header>
    <wsa:Action>http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</wsa:Action>
    <wsa:To>http://localhost:19081/coreAnagrafeUpdateService/coreAnagrafeUpdatePort</wsa:To>
    <wsa:ReplyTo>
    <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
    </wsa:ReplyTo>
    <wsa:MessageID>uuid:778b135f-3fdf-44b2-b53e-ebaab7441e40</wsa:MessageID>
    </soap-env:Header>
    <soap-env:Body></soap-env:Body>
    </soap-env:Envelope>
    ============
    ====[com.sun.xml.ws.assembler.server:response]====
    <?xml version="1.0" ?>
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
    <S:Fault xmlns:ns3="http://www.w3.org/2003/05/soap-envelope" xmlns="">
    <faultcode>S:Server</faultcode>
    <faultstring>javax.jbi.messaging.MessagingException: HTTPBC-E00798: Message normalization failed</faultstring>
    </S:Fault>
    </S:Body>
    </S:Envelope>
    ============
    Unsupported Content-Type: application/soap+xml Supported ones are: [text/xml]
    com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: application/soap+xml Supported ones are: [text/xml]
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:291)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:128)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:287)
    ====[com.sun.xml.ws.assembler.server:request]====
    <?xml version="1.0" ?>
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <soap-env:Header>
    <wsa:Action>http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</wsa:Action>
    <wsa:To>http://localhost:19081/coreAnagrafeUpdateService/coreAnagrafeUpdatePort/mex</wsa:To>
    <wsa:ReplyTo>
    <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
    </wsa:ReplyTo>
    <wsa:MessageID>uuid:778b135f-3fdf-44b2-b53e-ebaab7441e40</wsa:MessageID>
    </soap-env:Header>
    <soap-env:Body></soap-env:Body>
    </soap-env:Envelope>
    ============
    the wsdl is:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <definitions name="coreAnagrafeUpdateService"
    targetNamespace="http://service.box.nexus.com/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://service.box.nexus.com/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <types>
         <xsd:schema>
    <xsd:import namespace="http://service.box.nexus.com/" schemaLocation="core_anagrafe.xsd"/>
    </xsd:schema>
    </types>
    <message name="coreAnagrafeUpdateOperationRequest">
    <part name="parameters" element="tns:requestParameter"/>
    </message>
    <message name="coreAnagrafeUpdateOperationResponse">
    <part name="parameters" element="tns:coreAnagrafeResponse"/>
    </message>
    <message name="coreAnagrafeUpdateOperationFault">
    <part name="part1" element="tns:faultMessage"/>
    </message>
    <portType name="coreAnagrafeUpdatePortType">
    <operation name="coreAnagrafeUpdateOperation">
    <input message="tns:coreAnagrafeUpdateOperationRequest"/>
    <output message="tns:coreAnagrafeUpdateOperationResponse"/>
    <wsdl:fault name="fault1" message="tns:coreAnagrafeUpdateOperationFault"/>
    </operation>
    </portType>
    <binding name="coreAnagrafeUpdateBinding" type="tns:coreAnagrafeUpdatePortType">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <operation name="coreAnagrafeUpdateOperation">
    <soap:operation soapAction=""/>
    <input>
    <soap:body use="literal" />
    </input>
    <output>
    <soap:body use="literal" />
    </output>
    <wsdl:fault name="fault1">
    <soap:fault use="literal" name="fault1"/>
    </wsdl:fault>
    </operation>
    </binding>
    <service name="coreAnagrafeUpdateService">
    <port name="coreAnagrafeUpdatePort" binding="tns:coreAnagrafeUpdateBinding">
    <soap:address location="http://localhost:19081/coreAnagrafeUpdateService/coreAnagrafeUpdatePort"/>
    </port>
    </service>
    </definitions>
    Can anyone help me to understand the problem and solve it?
    Thanks in advance.

    Hi,
    Content-Type: application/xml
    ...check for the content type of the message that is sent ot the WS.....with the above mentioned content-type going to the WS currently...WS is not able to parse the req and hence the error....in other words wrong format being being passed.
    Regards,
    ABhishek.

  • What is RFC for "Content-Type: application/HTTP-Kerberos-session-enc"

    Does anybody know how to process HTTP request with content type "Content-Type: application/HTTP-Kerberos-session-enc" ?
    I cannot decode HTTP request:
    -- Encrypted Boundary
         Content-Type: application/HTTP-Kerberos-session-encrypted
         OriginalContent: type=application/soap+xml;charset=UTF-16;Length=1624
    -- Encrypted Boundary
         Content-Type: application/octet-stream
    <octet-stream>-- Encrypted Boundary
    Where <octet-stream> starts with four bytes [47, 0, 0, 0]
    other bytes from <octet-stream> I am trying to decode "context.unwrap()" method ("context" was created on previous request):
                                            GSSHeader gssHeader = new GSSHeader(new ByteArrayInputStream(content));
                                            log.debug("Incoming warped content length: " + content.length);
                                            log.debug("Incoming GSS header OID: " + gssHeader.getOid());
                                            log.debug("Incoming GSS header length: " + gssHeader.getLength());
                                            log.debug("Incoming GSS header MechTokenLength: " + gssHeader.getMechTokenLength());
                                       byte[] newBytes = context.unwrap(content, 0, content.length, msgProp);
    "content" - byte array which was created from <octet-stream> without first four bytes (without [47, 0, 0, 0]).
    "gssHeader" is created correctly because in debug log I see:
    Incoming warped content length: 1671
    Incoming GSS header OID: 1.2.840.113554.1.2.2
    Incoming GSS header length: 15
    Incoming GSS header MechTokenLength: 1656
    but on "unwrap" operation I've got exception:
    GSSException: Defective token detected (Mechanism level: Invalid padding on Wrap Token)
         at sun.security.jgss.krb5.CipherHelper.arcFourDecrypt(CipherHelper.java:1226)
         at sun.security.jgss.krb5.CipherHelper.decryptData(CipherHelper.java:532)
         at sun.security.jgss.krb5.WrapToken.getDataFromBuffer(WrapToken.java:230)
         at sun.security.jgss.krb5.WrapToken.getData(WrapToken.java:195)
         at sun.security.jgss.krb5.WrapToken.getData(WrapToken.java:168)
         at sun.security.jgss.krb5.Krb5Context.unwrap(Krb5Context.java:941)
         at sun.security.jgss.GSSContextImpl.unwrap(GSSContextImpl.java:384)
         at com.myproject.ws_management.WSServer$MyHandler.handle(WSServer.java:361)
         at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65)
         at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:65)
         at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:68)
         at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:552)
         at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65)
         at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:524)
         at sun.net.httpserver.ServerImpl$DefaultExecutor.execute(ServerImpl.java:119)
         at sun.net.httpserver.ServerImpl$Dispatcher.handle(ServerImpl.java:349)
         at sun.net.httpserver.ServerImpl$Dispatcher.run(ServerImpl.java:321)
         at java.lang.Thread.run(Thread.java:619)
    KeyTab instance already exists

    It looks like [47, 0, 0, 0] (hex [2F, 0, 0, 0]) is cipher suite, but on http://www.iana.org/assignments/tls-parameters
    I fount that it is:
    0x00,0x2F TLS_RSA_WITH_AES_128_CBC_SHA [RFC3268]
    So... what does this bytes can mean ?

  • Content-type: application/xml and Application server 9

    I have a web service running on Application server 9, implemented using netbeans and JAX-WS.
    When a client sends a request to it with:
    Content-type: application/xml
    the request is rejected because the server does not recognise the mime type.
    Specifically, the response is:
    HTTP/1.1 415 Unsupported Media Type
    X-Powered-By: Servlet/2.5
    Content-Type: text/plain; charset=iso-8859-1
    Date: Fri, 01 Sep 2006 14:49:04 GMT
    Server: Sun Java System Application Server Platform Edition 9.0
    Connection: close
    Everything works fine when the request has:
    Content-type: text/xml
    Is there a way to make my web service accept content type of 'application/xml'?
    -Tony Beaumont
    Aston University
    beaumoaj

    I have fixed this for myself, i.e. decompile, replace in jar.
    My problem was that most tools define the encoding but code was simply testing
    if( contentType.equalsIgnoreCase( "text/xml" ) )
    so sending xml from other tools that send contentType
    "text/xml;encoding=UTF-8" or some such, like soap tools, would mean no XML was seen.
    Is the proper source available for XSQL?

  • List with Multiple Content Types and Making new Forms...

    I go to create custom forms based on content types.  After I create using the wizard in the list it always shows the same form no matter which content type I pick.
    what am I doing wrong?
    David Jenkins

    You can change the custom form on content type through SharePoint Designer. Do not change it on the content type directly, when you add content type in a list/library, then open list's content types in SP Designer and then select your content type and modify
    the URLs of your custom display form.
    I have updated a document in gallery for
    step by step development of custom workflow and custom task form. In this document you can find the association of custom form with content type using SP Designer.
    Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer :)

  • CFHTTP request with content-type "application/atom+xml"

    Is it possible to send a HTTP request (method="post")  with a body that has a set content-type (such as "application/atom+xml")?
    using CFHTTP and CFHTTPPRAM, it seems the tag does not accept a content-type.
    <cfhttpparam type="body" value="#myAtomXML#">
    is there anyway to have CFHTTP , post the body with a given content-type?
    IF NOT, could anyone point me to the right direction to accompolish this using Java?

    Hi,
    Have you tried the "mimetype" attribute of the <cfhttpparam> tag?.
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_g-h_10.html

  • Issue in creating a add link to a document content type on a doc lib name with , / special characters

    hi,
    i am having a  requirement to create/use "add link to a document" content type for a item in the document library.
    so i got  the code from below site :
    http://howtosharepoint.blogspot.in/2010/05/programmatically-add-link-to-document.html
    my issue is, if teh document  library names are single words - like MOM, model, procedures etc this  functionality is working fine and i am able to view the link to a document as an item. 
    but when the doc lib name contains special characters like , or  /  , this link to a  document  content type functionality is NOT working.
    can anyone pls point me whether this is the  actual  issue ? ie, if  the doc lib name contains special chars  like , or /  my
    add link to a document wont work? is there any restrictions/limitations for doc lib names in SharePoint ?
    for eg: my doc lib names are :
    1) Report and analysis, Data
    2) form / template
    3) map/ plot
    help is highly appreciated!

    hi,
     its talking abt the subsite names and  folders and NOT the document librraies.
     is there any link which gives the naming convention / restricted names for  document libs or  splists , from msdn / blogs.technet.
    thnx

  • I have a client who was working with Now to Date, which is now obsolete.  She is looking for a mac calendar program that is as close to Now to Date as possible.  She has installed Outlook 2012 but finds that is takes too much time to enter data.  Help?

    I have a client who has been using Now to Date on her Mac.  That program is now obscure and she is looking for software that is extremely similar.  She has tried Outlook for Mac and it is too labor-intensive for her.  She wants a professional look, and something that is not linked to e-mail as she works with a lot of proprietary information.  Help?

    I could not identify that app in macupdate.com. If a Calendar program, what about iCal? did she try it and disliked? If you go to macupdate.com, and type ‘calendar’ in seach filed, you will be given a lot of apps, you or she should test what it most appropriate for your/her needs.

  • RV180 (wired only) problems with firmware 1.0.4.14, fails to boot correctly + LAN ports power off during boot (downgrading to 1.0.3.10 = fine again).

    Hi All,
    A few months ago when 1.0.4.14 was released I was quick to update to this version from 1.0.3.10 but very quickly ran into issues.
    Bit of background info...  I am not doing anything complex with this box, basic IP4 network over all LAN ports, no VLANs, firewall enabled and allowing 2 port access rules to a static IP address.  Any static IPs are assigned manual at host level but all other devices receive DHCP IP addresses.  I don’t host VPN on this RV180 but I do with another.  Routing VPN has no issues. WAN is connected to another switch provided by my ISP who provides DHCP IP Address with their DNS etc.  Only LAN ports 1 and 2 are connected, port 1 to my Wireless AP (AP mode passing all requests to the RV180, DHCP etc.), port 2 connects to a 8 port Smart Switch (but all 'Smart' features are currently not in use, so basic switching only).  All other settings on the RV180 are on recommended defaults.
    Everything is working fine on 1.0.3.10 but I have all kinds of issues after updating to 1.0.4.14.  Here are the actions and experiences I had...
    1) Backup my RV180 config to txt file.
    2) Navigate to the firmware upgrade page and follow steps to complete the upgrade process from 1.0.3.10 to 1.0.4.14.  *router does the normal process of upgrading*
    3) RV180 reboots to complete but doesn’t come back up even after waiting 5-10 mins.   LAN ports enable during boot up (link lights on) but after about 2mins turn off (no link lights).  WAN light is on alongside the Power Light.
    4) Power cycle even with rest... Same results.
    5) Reset the RV180 to default settings.  I can sometimes get the unit to boot up and the LAN remains active and powered up.  The web UI is VERY slow compared with 1.0.3.10.  Internet sometimes works and sometimes doesn't (I would expect it all work without issue on default settings).
    6) I repeat this a few times, various resets, powered off waiting periods, etc. but I always have issues.  I did manage to get some log file information and the Kernel appears in the Alert, Error and also the Warning logs (please see attached files).
    7) I gave up at this point.  No major issues like this reported on the internet from a few google searches etc.  So I then reset to defaults (1.0.4.14), downgrade to 1.0.3.10 and finally reset to defaults again + restore backup config settings (with some manual changes).
    The router has remained like this and seem to be working fine, but I would like any security improvements from 1.0.4.14 firmware on my device.
    Anyone able to help, have the same issue or can advise me in any other ways?
    I see 1.0.3.10 isn’t displayed as a firmware download on the standard support page for the RV180 now.  Only 1.0.2.6 and 1.0.4.14.  Do I need to downgrade again to 1.0.2.6 before upgrading to the latest version?
    Regards,
    ~FAZ~

    Hi,
    I recently bought a RV180 router and immediately I encountered the same problem; practically I am not able to access the web GUI.
    The PC is directly connected to the router, nothing else is connected; the TCP/IP configuration is as follows:
    PC: 192.168.1.100
    RV180: 192.168.1.1
    GATEWAY: 192.168.1.1
    SUBNET MASK: 255.255.255.0
    Once the router is turned on, the power LED flashes fastly, the Ethernet LED is on but after few minutes it disappears and the PC detects a disconnection of the Ethernet cable.
    The router is not pingable and, as I said, the web interface is not reachable.
    I have tried to power cycle the router, to reset it (pressing the reset button for more than 3 second and for more than one minute), to access the rescue mode and download a new firmware through TFTP, but nothing worked.
    Few times, after many boot and reset trials,I was able to access the web interface and in one of these occasions I updated the firmware to 1.0.4.14 but once the router is powered off the problem arises again at the next power on.
    I have not tried yet to downgrade to an older firmware version.
    Can you suggest any solution? thank you.

  • Invalid Content-Type with SAAJ

    I get the following exception when trying to send a SOAPMessage with an attachment. Sorry for the length of this post. Lots of info.
    com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:application/x-www-form-urlencoded. Is this an error m
    essage instead of a SOAP response?
    The HTTP request looks like the following, I abbreviated the attachment content.
    POST /edlf/design/service/ManagerServices/import HTTP/1.1
    Accept: text/xml
    User-Agent: Java/1.5.0_10
    Host: localhost:9080
    Connection: keep-alive
    Content-type: application/x-www-form-urlencoded
    Content-Length: 17537
    ------=_Part_0_24087760.1169577467505
    Content-Type: text/xml; charset=utf-8
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
    <ImportFileRequest>
    <File name="test.dlf"/>
    </ImportFileRequest>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    ------=_Part_0_24087760.1169577467505
    Content-Type: application/octet-stream
    lMqAAMxQMQBQSwMEFAAAAAgAPFtWNrcaY4xxAQAANwYAADMAAABMaXZlRG9jcy9Db250ZW50L0N1
    c3RvbWVyLzEvRG9jdW1lbnQvMS9QYWdlLzEvMS5iaW6VVL1OAzEMdig/LbQsLEggcV1ZbmGv1Lkj
    ooIJJKoCC0J06MDAyIxY4QGYeYATj8LEgtQBCTawcUIck8sdn2QlduwvsePEAMAZyjrKPYoBxhrK
    awOgBR47XYDPba/LuRHjO8at4niXsy0THPuLAAcr8AdfFjG71K9Qd7yEl3nmpANL3jp2uU5273fd
    YwmBaf3UxEP6aH+qxEjow6VZn2fOSql5awRG6VRwF1wURToYwsI3d0fTSdY/n6YC/ochSsceU95/
    WX66GgbC+3UcVGOSQ5x3sZHMQvVZtF9rM+zPeNqznr6lMnzU8JHQecW6IdbvdXgJrn6as+OUwenl
    hBzI0LYbPeN4Ija9QHkETo7Wxig5BhU4zlmfp1/6N5Tc3hGVO2zPduBXDeIfCF0nciz0LOl3BBtg
    ------=_Part_0_24087760.1169577467505--
    My code snippet for producing the above is:
    BASE64Encoder encoder = new BASE64Encoder();
    String encString = "";
    encString = encoder.encode(content);
    ByteArrayDataSource bds = new ByteArrayDataSource(encString, "application/octet-stream", fileName);
    DataHandler dh = new DataHandler(bds);
    URL url = new URL(serviceEndPt + "ManagerServices/import");
    HttpURLConnection connection = (HttpURLConnection)url.openConnection();
    connection.setDoOutput(true);
    connection.setDoInput(true);
    connection.setRequestMethod("POST");
    connection.setRequestProperty("Accept", "text/xml");
    OutputStream out = connection.getOutputStream();
    MessageFactory mf = MessageFactory.newInstance();
    SOAPMessage msg = mf.createMessage();
    SOAPPart sp = msg.getSOAPPart();
    SOAPEnvelope envelope = sp.getEnvelope();
    SOAPBody body = envelope.getBody();
    SOAPBodyElement root = body.addBodyElement(envelope.createName("ImportFileRequest"));
    SOAPElement fileEl = root.addChildElement(envelope.createName("File"));
    Name attName = envelope.createName("name");
    fileEl.addAttribute(attName, fileName);
    root.addChildElement(fileEl);
    AttachmentPart ap = msg.createAttachmentPart();
    ap.setDataHandler(dh);
    msg.addAttachmentPart(ap);
    msg.writeTo(out);

    The error does not seem to appears in WLS stack. Place a sniffer tool between your client and service to capture more info.
    Jong

  • Apex_web_service.make_rest_request: Passing parameters and the content type

    Not sure if I am missing something, but should this API be setting the content type (to application/x-www-url-formencoded) when there are values present for the parameters p_parm_name and p_parm_value.
    The example in the docs is to a yahoo API. I'm not sure about that particular one (see: http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_web_service.htm#BABEDJHJ), and I think it requires an appid (yahoo account), so i just went with the example here:
    http://developer.yahoo.com/yql/guide/yql-code-examples.html#yql_php
    If I run the following from a html file on my desktop it works:
    <form method="POST" action="http://query.yahooapis.com/v1/public/yql">
    <input type="hidden" name="q" value="select * from upcoming.events where location='San Francisco' and search_text='dance'"></input>
    <input type="hidden" name="format" value="json"></input>
    <input type="submit"></input>
    </form>That is, it returns a JSON result.
    The raw HTTP data is as follows:
    POST http://query.yahooapis.com/v1/public/yql HTTP/1.1
    Host: query.yahooapis.com
    Connection: keep-alive
    Content-Length: 110
    Cache-Control: max-age=0
    Origin: null
    User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Ubuntu/12.04 Chromium/20.0.1132.47 Chrome/20.0.1132.47 Safari/536.11
    Content-Type: application/x-www-form-urlencoded
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Encoding: gzip,deflate,sdch
    Accept-Language: en-AU,en;q=0.8,en-US;q=0.6
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
    q=select+fromupcoming.events+where+location%3D%27San+Francisco%27+and+search_text%3D%27dance%27&format=json>
    However, running the following returns nothing: (nothing, as in nothing that depends on the parameters passed in)
    set serveroutput on
    declare
    l_c CLOB;
    begin
      l_c := apex_web_service.make_rest_request(
        p_url => 'http://query.yahooapis.com/v1/public/yql',
        p_http_method => 'POST',
        p_parm_name => apex_util.string_to_table('q:format'),
        p_parm_value => apex_util.string_to_table('select * from upcoming.events where location=''San Francisco'' and search_text=''dance'':json'),
        p_proxy_override => 'http://192.168.1.3:8888');
      dbms_output.put_line(substr(l_c, 1, 4000));
    end;Raw HTTP data:
    POST http://query.yahooapis.com/v1/public/yql HTTP/1.1
    Host: query.yahooapis.com
    Connection: Keep-Alive
    Content-Length: 106
    Connection: close
    q=select+%2A+from+upcoming%2Eevents+where+location%3D'San+Francisco'+and+search_text%3D'dance'&format=json>
    I do note a key difference is that content type isn't being set in the web service API.
    This was just to test a public service. I do note that the above has slighty different request data (percentage encoding on some chars). However, I experienced the same behaviour on a procedure I had written (I can also provide this example test case if you like), which is where I first noticed the issue.
    Using utl_http and setting the content type to application/x-www-url-formencoded, does resolve the issue. However, just thought i'd see the possibility of using the Web service API that is made available.
    Is the example in the docs valid, or am I missing something obvious?
    This is on ApEx 4.1 on the OTN Dev Days VM.
    Thoughts?

    Hi trent,
    I too have had issues with this API , so moved forward with UTL_HTTP API.
    There is something amiss.
    If you change your code to the one below it works.
    SET SERVEROUT ON
    declare
    l_c CLOB;
    l_param varchar2(1000) ;
    begin
    l_param := 'select * from upcoming.events where location=''San Francisco'' '||
            ' and search_text=''dance'''||'&'||'format=json';
    l_c := apex_web_service.make_rest_request(
        p_url => 'http://query.yahooapis.com/v1/public/yql?q='||
            utl_url.escape(l_param)
        ,p_http_method => 'POST'
      dbms_output.put_line(substr(l_c, 1, 4000));
    end;
    /Note the use of UTL_URL.ESCAPE. The call does not work without it.
    I do not use a proxy, so that parameter does not feature in my snippet above.
    Cheers,
    PS: However, the below does not work. So, it appears that the p_parm_name and p_parm_value do not quite work.
    SET SERVEROUT ON;
    declare
    l_c CLOB;
    l_param varchar2(1000) ;
    begin
    l_param := 'select * from upcoming.events where location=''San Francisco'' and search_text=''dance''';
    l_c := apex_web_service.make_rest_request(
        p_url => 'http://query.yahooapis.com/v1/public/yql'
        ,p_http_method => 'POST'
        ,p_parm_name => apex_util.string_to_table('q:format')
        ,p_parm_value => apex_util.string_to_table(utl_url.escape(l_param)||':json')
      dbms_output.put_line(substr(l_c, 1, 4000));
    end;
    / Edited by: Prabodh on Oct 13, 2012 2:04 PM

  • Content type in HTTP adapter

    Hi experts,
    is content type application/x-www-form-urlencoded is supported in XI reciever HTTP adapter when we post some raw data ( without XML tags)? we are testing the same with fiddler ( Mozilla poster).
    Please advise.
    Thanks

    Hi steve,
    Thanks for the reply, but the solution is not there.
    anyone has configured the same, then please help.
    Thanks.

  • Content-Type for POST request

    Hi all again,
    I am setting content-type in the header to "text/xml"  yet when I do a POST sap sends as content-type
    "application/x-www-form-urlencoded". Is there something else I need to set to make it post with text/xml ?
      cl_http_client=>create_by_url( EXPORTING url = url
                                               ssl_id = 'ANONYM'
                                     IMPORTING client = http_client ).
    * create HTTP client object
    *  cl_http_client=>create_by_destination( EXPORTING DESTINATION = 'ZTOLLREQUEST'
    *                                 IMPORTING client = http_client ).
                                                                                    * Set HTTP headers
      http_client->request->set_header_field( name = '~request_method'
      value = 'POST' ).
      http_client->request->set_header_field( name = 'Content-Type'
      value = 'text/xml' ).
    *  http_client->request->set_header_field( name = 'Authorization'
    *  value = auth_string ).
    *  http_client->request->set_header_field( name = 'sap-password'
    *  value = 'ymous' ).
                                                                                    * Set payload
      http_client->request->set_cdata( xml_string ).
                                                                                    * send and receive
      CALL METHOD http_client->send
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2.
    regards
    Allan

    i havent tried this (setting content type) when using create by url . may be try just the create method and then set the remaining part of the url as headers ~request_uri parameter. something like below.
    call method cl_http_client=>create
      exporting
        host          = 'www.webservicex.net'
        service       = '80'
        scheme        = '1'
        proxy_host    =  wf_proxy
        proxy_service =  wf_port
      importing
        client        = http_client.
    http_client->propertytype_logon_popup = http_client->co_disabled.
    wf_user = user .
    wf_password = password .
    call method http_client->authenticate
      exporting
        proxy_authentication = 'X'
        username             = wf_user
        password             = wf_password.
    call method http_client->request->set_header_field
      exporting
        name  = '~request_method'
        value = 'POST'.
    call method http_client->request->set_header_field
      exporting
        name  = '~server_protocol'
        value = 'HTTP/1.1'.
    call method http_client->request->set_header_field
      exporting
        name  = '~request_uri'
        value = '/airport.asmx'.
    Regards
    Raja

  • Help with implementing security using Applets & Servlets

    Currently I have an applet that hits a database. This applet also pops open new pages by calling a servlet [showDocument(servletURL, _blank)].
    Database is going to have list of user names and passwords. I want to implement so that when the user hits the applet, they have to log on into the applet. The applet will hit database and verify name/pass. Different users will have different database views.
    Servlet hits this same database, and I want it to use the same name/pass combination when creating html.
    So, the question is: How do I pass this name/pass along to the servlet? I do not want to have this: showDocument(http://servlet/myServlet?name=john&pass=doe, _blank) as this will show in the history and another can come along after and see his name/pass.
    I also do not want a user to just be able to hit the servlet by typing in the URL without going through the applet.
    All help is appreciated! Thanks!

    You can use the following to pass a String directly to a servlets POST method
    import java.io.*;
    import java.net.*;
    import java.util.*;
    public class HttpMessage
         URL servlet = null;
         public HttpMessage(URL u)
              servlet = u;
         public InputStream sendPostMessage(String s) throws IOException
              // send query string to the servlet and return the input stream
              // containing the results to the applet
              String queryString = s;
              URLConnection con = servlet.openConnection();
              con.setDoInput(true);
              con.setDoOutput(true);
              con.setUseCaches(false);
              con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
              // Write the arguments as post data
              DataOutputStream out = new DataOutputStream(con.getOutputStream());
              out.writeBytes(queryString);
              out.flush();
              out.close();
              // returns the INPUT STREAM to the calling method in the Applet
              return con.getInputStream();
    } // end class sendPostMessage

Maybe you are looking for