• Welcome to KonaKart Community Forum. Please login or sign up.
 

Dealing with "java_soap_examples": I'm getting the lower version output, whereas

Started by anton83, October 24, 2015, 12:02:24 pm

Previous topic - Next topic

anton83

Hi,

I'm at the stage where I'd like to test and familiarize with java_soap_examples.

Here's what I did and what I'm experiencing.

1. Ant is installed and "ant -p" lists the commands just fine
2. I enabled the SOAP services
3. Running "ant" when in java_soap_examples was at first giving me bunch of errors. I then edited the port number in those files from 8780 to 8080
4. The above didn't work. I suspected it was due the server having many accounts on it, including other test konakart installations. So I changed "localhost:8080" with "www.mydomain.com:8080".
5. Now the console outputs:

[java] First the low-level version...
     [java]
     [java] There are 238 countries
     [java] There are 25 manufacturers
     [java] The default currency is: USD
     [java] 63 products found
     [java] 63 length of product array

But for "high-level" I'm still getting a bunch or errors:

[java] Next the recommended high-level version...
     [java]
     [java] com.konakart.app.KKException: java.net.ConnectException: Connection refused
     [java]     at com.konakart.ws.KKWebServiceSoapMgr.createKKExceptionFromAxisFault(Unknown Source)
     [java]     at com.konakart.app.KKWSEng.manageThrowable(Unknown Source)
     [java]     at com.konakart.app.KKWSEng.getAllCountries(Unknown Source)
     [java]     at com.konakart.AxisExample.highLevelVersion(Unknown Source)
     [java]     at com.konakart.AxisExample.main(Unknown Source)
     [java] Caused by: java.net.ConnectException: Connection refused
     [java]     at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
     [java]     at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)
...skipped many more lines....


I also tried to run the AxisExample.java in the console and it reported something about packages not being available, etc.

========================================================

What seems to be the issue here? My host inspected this and confirmed that no changes occur when they disable the firewall so it can be ruled out.

Some notes:

- I also edited in the same manner this file under java_api_examples/src: konakartadmin_axis_client.properties
- But there is no "konakart_axis_client.properties" file in this location!! Is this normal?

anton83

(Also pasting this because there are some lines which aren't present in the documentation example)

Buildfile: /home/wwwimpor/public_html/java_soap_examples/build.xml

clean:
     [echo] Cleanup...

axis_client_generation:
     [echo] Create the KonaKart client stubs from the WSDL

compile:
     [echo] Compile the examples
    [mkdir] Created dir: /home/wwwimpor/public_html/java_soap_examples/classes
    [javac] /home/wwwimpor/public_html/java_soap_examples/build.xml:105: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 118 source files to /home/wwwimpor/public_html/java_soap_examples/classes
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 1 warning

run:
     [java] First the low-level version...
     [java]
     [java] There are 238 countries
.............

anton83

I accidentally solved it. Should anyone need the details how, he/she is invited to ask here.

-----------------------

Now, I'd like to know how do I use the URL to, for example, call something from another website which is, say PHP? Can I use this endpoint URL which is in the files:

http://www.example.com/konakart/services/KKWebServiceEng?wsdl or http://www.example.com/konakart/services/KKWebServiceEng

If yes, how do I append the API calls onto it, or what is the philosophy behind it?