Axis2 and wsdl- Exception thrown when client attempting server connection

Hi all,
I am trying at the moment to develop an Axis2 server, and test it with a client.
The server is to provide a soap wsdl service, returning an object request.
I have generated server code and client code using axis2's wsdl2java tool, and all seemed fine.
The server I created using this generated code seems to work, so far as i can tell, as I can connect to it through a browser.
For example, using the browser I can connect to it via:
http://localhost:8888/services/PersonInfo
and it gives me a page showing 'Deployed Services', listing the operations available.
but the funny thing is here that it seems to auto-direct me to another url: http://localhost:8888/axis2/services/ which I have not specified.
For the server I am using the axis2 supplied SimpleHTTPServer. Here is the complete code excluding the actual generated code:
public class EmbeddedAxis2Server {
    public static void main(String[] args) throws Exception {
        ConfigurationContext context = ConfigurationContextFactory.
        createConfigurationContextFromFileSystem(null, null);
        AxisService service =
        AxisService.createService(caps.integration.rhos.dk.schema.astraiaservice._2008._04._15.PersonInfo.class.getName(), context.getAxisConfiguration());
        context.getAxisConfiguration().addService(service);
        SimpleHTTPServer server = new SimpleHTTPServer(context, 8888);
        server.start();
}I can even call the published operation using the browser, via the url:
http://localhost:8888/axis2/services/PersonInfo/getPersonInfo
and pass in arguments using the usual form variables syntax.
HOWEVER!! My problem is (and maybe it is related to the url redirect strangeness I mentioned above, or maybe not), that my coded client is not able to connect.
I generated the client stubs also using wsdl2java, and call the functions... but I get this show stopping exception:
org.apache.axis2.AxisFault: The service cannot be found for the endpoint reference (EPR) 127.0.0.1/services/PersonInfo
     at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
     at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
     at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
     at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
     at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
     at caps.integration.rhos.dk.schema.astraiaservice._2008._04._15.PersonInfoStub.getPersonInfo(PersonInfoStub.java:142)
     at com.astraia.axisclient.Client.getPersonInfo(Client.java:44)
     at com.astraia.axisclient.Client.main(Client.java:23)Here is the client code (excluding generated stub)
    public static void getPersonInfo(){
        try
             ConfigurationContext context = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
             PersonInfoStub stub =new PersonInfoStub(context);
            GetPersonInfoIn req =new GetPersonInfoIn();
            req.setCivilRegistrationIdentifier("CIV123");
            req.setHospitalCode("HOS123");
            req.setRequestId("123");
            req.setUserName("sean");
            GetPersonInfoOut res = stub.getPersonInfo(req);
            System.out.println(res.toString());
        } catch(Exception e){     e.printStackTrace();       System.out.println("\n\n\n");      }
    }If anyone has any idea of what this problem is about, I would love to hear about it!
Kind Regards,
svaens
Edited by: svaens on Apr 28, 2008 2:11 AM

Hi, I have an update!!!
Another aspect of my problem (which I had forgotten to mention) was a mysterious difference in the original wsdl file, and the one that was generated by my SImpleHTTPServer when my browser contact it, and requested the wsdl. That is, when I use the url in my firefox browser
[http://localhost:8888/axis2/services/PersonInfo?wsdl|http://localhost:8888/axis2/services/PersonInfo?wsdl]
the wsdl that was returned to the browser was different in several ways to the original wsdl that I generated my server side java code from using the axis2-1.3 wsdl2java.sh script.
I had noticed this, and decided to create a client using this new and strangely different wsdl, and see if this provides different results.
It worked!!! After creating my stub java code with the new wsdl file, and the wsdl2java tool, and modifying my custom java code to match the different stub generated, the client was able to connect to the server, and return me a serialized object.
Does this give you any clues as to what may be the real problem?
Differences in the wsdl include:
1. the targetNamespace attribute listed in the wsdl:definitions tag shows the namespace backwards!!
2. The new generated wsdl file has two extra element types,
GetPersonInfo, and GetPersonInfoResponse, + GetPersonInfoIn , GetPersonInfoOut
while the original only game me GetPersonInfoOut & GetPersonInfoIn.
The client code I had to change now looks like this:
try
            ConfigurationContext context = ConfigurationContextFactory.
            createDefaultConfigurationContext();
        PersonInfoStub stub =  new PersonInfoStub(context);
            GetPersonInfo reqs =   new GetPersonInfo();
            GetPersonInfoIn req = new GetPersonInfoIn();
            reqs.setGetPersonInfoIn(req);
            req.setCivilRegistrationIdentifier("CIV123");
            req.setHospitalCode("HOS123");
            req.setRequestId("123");
            req.setUserName("sean");
            GetPersonInfoResponse res = stub.getPersonInfo(reqs);
            GetPersonInfoOut resultObj = res.get_return();
                        OMFactory fac = OMAbstractFactory.getOMFactory();
                        OMElement xml = resultObj.getOMElement(GetPersonInfoResponse.MY_QNAME, fac);
                        XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(System.out);
                        writeOMElement(xml, writer);
        } catch(Exception e){
            e.printStackTrace();
            System.out.println("\n\n\n");
        }

Similar Messages

  • When I attempt to connect to iCloud I get the error message: Apple id's email address cannot be verified.  There is nothing wrong with my apple id and I do not want to change it.Any suggestions?

    When I attempt to connect to iCloud I get the error message: Apple id's email address cannot be verified.  There is nothing wrong with my apple id and I do not want to change it.Any suggestions?

    Debi....
    Try "resetting" your Apple ID password >  Apple - My Apple

  • HT201269 Hi, I have just changed contract and phone and wish to transfer the content of my iphone 4 to my new phone device which is not and I-product.  When I attempt to sign into i-tune to transfer the item to dropbox, i am unable to sign into i-tune.  H

    Hi, I have just changed contract and phone and wish to transfer the content of my iphone 4 to my new phone device which is not and I-product.  When I attempt to sign into i-tune to transfer the item to dropbox, i am unable to sign into i-tune.  Help pls.

    Hi, Kilted, I shall put it as below:
    Cancelled a contract on my Iphone and started another contract with  Samsung Note 2 on O2.  Managed to transfer almost all my data bar the content of my notes through drag and drop from itune to sKies prior to contract cancellation.
    When I later connected the iphone to the laptop to carry out an advise of going into itune to drag and drop the note content into dropbox from where I could pull into the samsung device, I was denied access into itune with my id , the same which has facilitated my access to this chat community.
    Question then: Am I not able to use itune again because of the contract cancellation?

  • Severa years ago I purchased online Adobe Creative Suite, I recently had to change computers, and lost the program, when i attempted to restore from a cd i received a notice that my serial number was incorrect??? I paid a lot of money for this program I w

    severa years ago I purchased online Adobe Creative Suite, I recently had to change computers, and lost the program, when i attempted to restore from a cd i received a notice that my serial number was incorrect??? I paid a lot of money for this program I want this corrected.@

    Hi gutturnio,
    Kindly provide the below mentioned details in a "Private Message" so that we can assist you appropriately.
    Product your are trying to install:
    OS version:
    Order #:
    Serial #:
    Email Id on which you have registered the serial number:
    There could also be an issue with the compatibility of the software and operating system you are using.
    Kindly check system requirements:
    CS 6: System requirements | Adobe Creative Suite 6
    System requirements | Photoshop 
    Meanwhile, try:
    Error "The serial number is not valid for this product" | Creative Suite 
    Invalid serial number error
    Thanks,
    Atul Saini

  • Have downloaded both Adobe reader and PDF reader, but when I attempt to open a pdf from a site on safari, it starts to load, then disappears.  Any way to fix this?

    Have downloaded both Adobe reader and PDF reader, but when I attempt to open a pdf from a site on safari, it starts to load, then disappears.  Any way to fix this?

    Try quitting the PDF apps and Safari like I describe below. Then reset the iPad. After it starts try again.
    Double click the Home button to show the screen with running and recently used apps. Each app icon will have a sample page above it. Flick up on the page (not the app icon) and the page will fly away and the app icon will disappear. This quits that app. Then reset your device. Press and hold the Home and Sleep buttons simultaneously until the Apple logo appears. Let go of the buttons and let the device restart. See if that fixes your problem.

  • When I attempt to connect to iTunes Store, I receive the following error message: An unknown error has occurred (0x80090318).  Any help appreciated!

    When I attempt to connect to iTunes Store, I receive the following error message: An unknown error has occurred (0x80090318).  Any help appreciated!

    Hey there Dan256162,
    I understand that you are receiving a specific error code when attempting to connect to the iTunes Store, error 0x80090318. I have an article for you that references this code and links you to another article for troubleshooting to address this issue. Here is the article that references the error code:
    iTunes: Possible iTunes Store errors - Apple Support
    http://support.apple.com/en-us/HT203174
    And here is the linked troubleshooting article that will help you resolve the issue:
    Apple software on Windows: May see performance issues and blank iTunes Store - Apple Support
    http://support.apple.com/en-us/TS4123
    Take care, and thanks for visiting the Apple Support Communities.
    Cheers,
    Braden

  • TS1368 HELP!!! After upgrading to IOS 6.13 my IPAD Stucks in a plug-in screen and the Itunes. When i Try to connect to iTUNES pop-up message apear "iTunes has detected an iPad in recovery mode.. You must restore this iPad before it can be used with iTunes

    I have windows 8 enterprise OS and iTunes ver. 10.5.0.142. I was upgrading my iPad to IOS 6.1.3. After finishing the upgrade my iPad Reboot and currently stucked-up in a plug-in screen and iTunes Logo. When I try to connect it to the iTunes pop-up message appear saying " iTunes has detected iPad in recovery mode. You must restore this iPad before it can be used with iTunes." In short, I push the restore button then another pop-up message appear saying " The iPad software update server could not be contacted. Make sure your network settings are correct and your network connection is active, or try again later." I tried many ways but still no luck. I repeatedly reboot the iPad and open the iTunes still the same problem. I try also to uninstall the iTunes and installed the lower version but still the same problem, I even check the firewall if the ITunes was block or My privileges is administrator to run the iTunes or even reset my winsock but the problem still remain. PLEASE HELP! Thank you in advance!!!

    Turn off your firewall and antivirus software.

  • I have updated to the latest version of iTunes (11.2.2.3). However, when I connect my iPod it shows in My Computer and iTunes opens automatically when the iPod is connected but the device doesn't show in iTunes.  Any ideas?

    I have updated to the latest version of iTunes (11.2.2.3). However, when I connect my iPod it shows in My Computer and iTunes opens automatically when the iPod is connected but the device doesn't show in iTunes.  Any ideas?  I am on Windows 8.1 and my iPod is a Classic

    Hi murr18140,
    Welcome to the Support Communities!  The article below will help you troubleshoot the issue you are having with your iPod classic not being recognized in iTunes for Windows:
    iPod: Appears in Windows but not in iTunes
    http://support.apple.com/kb/TS1363?viewlocale=en_US
    I hope this information helps ....
    - Judy

  • TS1410 My iPod shuffle ( 1st or 2nd generation) will not recharge and does not show when the doc is connected to my MacBook Pro. I'm running the latest updated version of iTunes.

    My iPod shuffle ( 1st or 2nd generation) will not recharge and does not show when the doc is connected to my MacBook Pro. I'm running the latest updated version of iTunes.

    Hello Jane Benstock,
    Thank you for using Apple Support Communities
    It sounds like the next best step to take would be to reset the iPod Shuffle.
    Check out this article named Resetting iPod shuffle found here http://support.apple.com/kb/HT1655.
    All the best,
    Sterling

  • I can see myself and hear the other person while attempting to connect to face time but cannot see them

    New iPhone 4S. Attempting to use face time but it wont show the person I am attempting to connect with. I can see myself and hear the other person while attempting to connect to face time but cannot see them. Face time was working before.

    Hello Wollyt
    Check out the article below for troubleshooting FaceTime issue.
    iOS: Troubleshooting FaceTime
    http://support.apple.com/kb/ts3367
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • When I attempt to connect my new MacBook Air to my home network I receive a dialogue that says " Could not join name of network .  A connection timeout has occurred.  Any ideas on how to deal with this?

    When I attempt to connect my new MacBook Air to my home network I receive a dialogue that says " Could not join <name of network>.  A connection timeout has occurred.  Any ideas on how to deal with this?

    Please review the following Apple Support article for assistance with troubleshooting wireless connections.
    You may also find this OSXDaily article helpful as well.

  • My ipod touch 4th gen froze! blank white screen and doesn't respond when turned off, or connected to my laptop

    my ipod touch 4th gen froze! only blank white screen and doesn't respond when turned off or connected to my laptop!

    First, try a system reset.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until the screen blacks out or you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  Connect via cable to the computer that you use for sync.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."
    Finally, if the Restore doesn't work, let the battery drain completely.  Then recharge for at least an hour and Restore again.

  • Got Error when creating application server connection

    Hi Guys...I am using SOA 10.1.3.1.0
    I got the following error when creating application server connection
    In Step 1:
    I selected the Connection type as Standalone OC4J 10.1.3 (Why because I use this one)
    In Step 2:
    In this step I gave username and password (same username and password to connect to BPEL console)to authenticate connection
    In step 3:
    It is asking for Hostname, RMI port and URL path. My computer name is gopal-computer. I gave this hostname. RMI port number is 23791 by default. I kept this one as it is and URL path optional I think. I did not give any thing.
    In step 4:
    When I hit the test connection button its giving the following error
    Error while getting remote MBeanServer for url: ormi://gopal-computer:23791/default:
    Error reading application-client descriptor: Error communicating with server: Connection refused: connect; nested exception is:
         javax.naming.CommunicationException: Connection refused: connect [Root exception is java.net.ConnectException: Connection refused: connect]
    Please help me.
    Thanks,
    Gopal.....

    For SOA Suite connection you should choose "Oracle application server 10g 10.1.3"

  • How do I set the "When an OCSP server connection fails, treat the certificate as invalid" in Firefox for Android?

    Due to the security concerns from Heartbleed and Steve Gibson's excellent coverage on certification revocation, I have set "When an OCSP server connection fails, treat the certificate as invalid" on my desktop Firefox and now want to do the same on Firefox for Android. I cannot find anything in the settings menu to allow this. Is it done through about:config and if so, what is the setting name there?

    hello mcvickerp, in about:config you can switch the setting "security.OCSP.require" to true.

  • Exception thrown when I remove and add Tab?

    Hi,
    I use the JTabbedPane, and I made a button, when it's pressed, it will remove all tab from the JTabbedPane, and then it will recreate every tab(update them) and add it back. But sometimes there's exception thrown, why is that? the exception are:
    java.lang.ArrayIndexOutOfBoundsException: 4 <------------------- this number always change
    at javax.swing.plaf.basic.BasicTabbedPaneUI.paintTabArea(BasicTabbedPaneUI.java:535)
    at javax.swing.plaf.basic.BasicTabbedPaneUI.paint(BasicTabbedPaneUI.java:497)
    at javax.swing.plaf.metal.MetalTabbedPaneUI.paint(MetalTabbedPaneUI.java:666)
    at javax.swing.plaf.metal.MetalTabbedPaneUI.update(MetalTabbedPaneUI.java:561)
    at javax.swing.JComponent.paintComponent(JComponent.java:541)
    at javax.swing.JComponent.paint(JComponent.java:808)
    at javax.swing.JComponent.paintChildren(JComponent.java:647)
    at javax.swing.JComponent.paint(JComponent.java:817)
    at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4795)
    at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4748)
    at javax.swing.JComponent._paintImmediately(JComponent.java:4692)
    at javax.swing.JComponent.paintImmediately(JComponent.java:4495)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:117)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    Does anyone know why? Thx
    Adrian

    Does anyone know why? I still can't solve this problem, it just keep popping up, but the strange thing is after exception thrown, nothing has happeded, everything seems to be fine, the program still running, all those tabs are added.
    Does anyone know why?

Maybe you are looking for

  • HP officejet Pro 8600 unable to connect to scanner

    HP Office jetPro  8600 NG11a, Windows 7 operating system, connected to network via ethernet connection I have only had the printer for a couple of months. Initially had probelms with the network connection which was resolved by manually inserting the

  • Premiere CC "Not Responding" Message after opening

    Hi, Two of my projects (one last week that I managed to get open) have crashed. They open up on CC, then the project  loads and I can see everything fine. However, when I click anywhere, Premiere goes white and it says "Not Responding" on the top. I

  • Opera 12 instead of 26 installs on 64 bit system

    Archwiki: "In early December 2014, Opera version 26 was released, but only for 64-bit systems: with this milestone, the old proprietary Presto layout engine is replaced with the more modern and open-source Blink engine. The previous 12.16 version is

  • How do i up date my apps? i have 8 updates for apps but its still giving me my old username and wants my old password

    How do i up date my apps? i have 8 updates for apps but its still giving me my old username and wants my old password when i go to update. i have restored and everything works except when i go to update the apps. ican access all other info with new u

  • Question About "DDTS:CSCub24886"

    This DDTS is written for Catalyst2960S. but I think Catalyst3750 series target device too. Because Catalyst3750 has stack  function EX.Catalyst2960S If there is information, please provide it. DDTS:CSCub24886 Symptom: Incorrect cudldpInterfaceOperSta