• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

SOAP based JAVA Object in CF

New Here ,
Sep 12, 2006 Sep 12, 2006

Copy link to clipboard

Copied

Hello,

I am currently developing a JAVA based object to be accessed using <cfobject>. The Java object is using the RPC web service based on Java WSDP 2.0. The class that the cfobject is creating can function properly when it is executed as a standalone object through a Java based application but as an object in Cold Fusion it gives errors. I have placed all the appropriate libraries in the correct folder, "...wwwroot\WEB-INF\lib".

When my page attempts to access the method in the object that performs an RPC call then it throws the following error:

Couldn't create SOAP message factory due to exception: javax.xml.soap.SOAPException: Unable to create message factory for SOAP: org.apache.axis.soap.MessageFactoryImpl; nested exception is:
Couldn't create SOAP message factory due to exception: javax.xml.soap.SOAPException: Unable to create message factory for SOAP: org.apache.axis.soap.MessageFactoryImpl

Can anyone give me some input as to what this error means and if anyone has seen it before in a ColdFusion environment (specifically using JWSDP)? If you need the code then i'll post it but i have to censor out some static info. Just need some leads for now...

Thank you!
TOPICS
Advanced techniques

Views

704

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 13, 2006 Sep 13, 2006

Copy link to clipboard

Copied


From the errors you are describing, it looks like CFMX uses apache axis but
your program uses JWSDP which does not use apache axis.

I'm not sure if these engines are interchangeable?

However, I have to imagine that the API's are very close and may only require
minor tweaking.

Perhaps you should download apache axis and develop your java program
based on that?


Good luck!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 13, 2006 Sep 13, 2006

Copy link to clipboard

Copied

Thanx for the reply! I'm going recode the class file to see if I can use Apache Axis' libraries in place of the JWSDP libraries for the SOAP requests and hopefully CF will be agreeable with that. It's just that part of the class uses libraries from Novell who's SOAP requests were tailored for JWSDP hence the errors but I'll see if I can get them to work together.

Otherwise I'll see if I can get away with the orginal class working under a J2EE/CF environment and treat it like a bean. I'll repost if it works with a better description of the code and stuff so that anybody else with the same/similar error/situation can give it a try. Searching the net with regards to this problem didn't reap much information for me.

Thanks again for the tip and i'll let you know!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 01, 2014 Dec 01, 2014

Copy link to clipboard

Copied

LATEST

Dear All Technology Expert's,

I have a query related to Coldfusion SOAP services, that is most commonly asked in all the forum's but NONE of them has got answer.

If there is NO solution so I think Adobe has to come up with some patches so developer can able to do some customization.

I like to share with you all, in all other language ( PHP, JAVA, .NET etc) this option is available and you can customize the error.

Ok let me again explain the very basic error:

SOAP Request:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Header/>

   <soapenv:Body>

    

   </soapenv:Body>

</soapenv:Envelope>

SOAP Response:

  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <soapenv:Body>

      <soapenv:Fault>

         <faultcode>soapenv:Server.userException</faultcode>

         <faultstring>java.lang.Exception: Body not found.</faultstring>

         <detail>

            <ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/">java.lang.Exception: Body not found.

  at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:121)...</ns1:stackTrace>

            <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">Coldfusion Error</ns2:hostname>

         </detail>

      </soapenv:Fault>

   </soapenv:Body>

</soapenv:Envelope>

HOW we can customize the error, in all other languages you can simple customize the error like

Other languages SOAP response:

  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <soapenv:Body>

      <soapenv:Fault>

         <faultcode>BODY_NOT_FOUND</faultcode>

         <faultstring>Body is missing in your request</faultstring>

        

      </soapenv:Fault>

   </soapenv:Body>

</soapenv:Envelope>

But the same is NOT possible in Coldfusion, right?

AS you know it is vulnerability to display exception messages in the response.

We are developing this web service to access  from other language website (PHP, .NET).

We are also planning to upgrade server the Coldfusion 11, but do you think there is any solution with latest Coldfusion version.

Please response only if you know about these issue's or solution. 

Thanks

Niyaz

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation