9 Replies Latest reply on Jun 8, 2010 7:21 PM by 775370

    SOAPFaultException

    701938
      Hi,
      I have dowloaded a wsdl of custom object from the CRM oD Webservice Admistration page.
      I have created a client from this wsdl using Jdeveloper.When I try to run the querypage method present in the generated client using a main method (using hardcoded values), I get SOAPFaultException, also on executing other methods like customObject1Update(obj) method I am getting same error.
      Following is the the code snippet:-

      public static void main(String[] args) {
      try {
      demo.proxy.CustomObject1Client myPort = new demo.proxy.CustomObject1Client();

      String strEndPoint = myPort.getEndpoint() + ";" + CRMODLogin.logon(myPort.getEndpoint(),
      "<Userid>", "<Password>");
      myPort.setEndpoint(strEndPoint);
      System.out.println("calling " + myPort.getEndpoint());
      // Add your own code here
      CustomObject1Query param= new CustomObject1Query();
      QueryType q = new QueryType();

      //q.set_value("AGHA-GEVLJ");
      // param.setId(q);
      //param.setExternalSystemId(q);
      //param.setIntegrationId(q);

      CustomObject1QueryPage_Input input=new CustomObject1QueryPage_Input();
      //input.setViewMode("Broadest");
      input.setListOfCustomObject1(new ListOfCustomObject1Query());
      input.getListOfCustomObject1().setCustomObject1(param);
      myPort.customObject1QueryPage(input);
      System.out.println("Successful execution of query");

      } catch (Exception ex) {
      System.out.println("Error while executing query");
      ex.printStackTrace();
      }
      }

      EXCEPTION:-
      calling https://secure-ausomxgha.crmondemand.com/Services/Integration;JSESSIONID=8d928b0c231c4153aaa036804395b5aaa763b87550f5.e3iRbxiTc350bxaObhyQb3aTe0; path=/Services; secure
      Error while executing query
      javax.xml.rpc.soap.SOAPFaultException: Server
           at oracle.j2ee.ws.client.StreamingSender._raiseFault(StreamingSender.java:565)
           at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:400)
           at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:113)
           at demo.proxy.runtime.CustomObject1_Stub.customObject1QueryPage(CustomObject1_Stub.java:130)
           at demo.proxy.CustomObject1Client.customObject1QueryPage(CustomObject1Client.java:118)
           at demo.proxy.CustomObject1Client.main(CustomObject1Client.java:92)
      Process exited with exit code 0.
        • 1. Re: SOAPFaultException
          venky-610974
          Hi, The way you set the querytype seems to be wrong. See below for an example. Hopefully it helps you

          crmondemand.AccountStub.QueryType qt = new crmondemand.AccountStub.QueryType();
          qt.setString("='" + "Segment2'");
          newAccount.setAccountName(qt);

          -- Venky CRMIT

          Edited by: Venky CRMIT on May 18, 2009 4:55 PM
          • 2. Re: SOAPFaultException
            701938
            Thanks for the reply.I got solution g\fot the problem.I added following code

            public static String getSessionId(String cookie) {
            StringTokenizer st = new StringTokenizer(cookie, ";");
            String jsessionid = st.nextToken();
            st = new StringTokenizer(jsessionid, "=");
            st.nextToken();

            return st.nextToken();
            }
            and used it in follwing code just as a 1stline in my main method before calling client methods:-

            String strEndPoint = myPort.getEndpoint() + ";jsessionid=" +getSessionId(CRMODLogin.logon(myPort.getEndpoint(),
            "<Userid>", "<Password>"));
            myPort.setEndpoint(strEndPoint);

            But when I tried to execute the querypage method using follwing code as suggested by you I get all the fields in the returned array of Java Object as null even when data is present for the entered accountname:-

            Code snippet:-

            CustomObject1QueryPage_Input input=new CustomObject1QueryPage_Input();
            input.setViewMode("Personal");
            input.setListOfCustomObject1(new ListOfCustomObject1Query());
            CustomObject1Query param= new CustomObject1Query();
            QueryType q = new QueryType();
            q.set_value("='"+"A ACHARARYA'");
            param.setAccountName(q);
            input.getListOfCustomObject1().setCustomObject1(param);
            CustomObject1QueryPage_Output output=myPort.customObject1QueryPage(input);

            Output:-

            calling https://secure-ausomxgha.crmondemand.com/Services/Integration;jsessionid=8d928b0c231c98b697bb04624935a344f8394d938e51.e3iRbxiTc350bxaObhyQb3aTe0
            Output data size is 2
            Output data size is- null
            Accnt Id null
            Account Name A ACHARARYA
            ID null
            Sales_Order_No null
            Credit_Outstanding null
            Voucher_Number() null
            Accnt Id null
            Account Name A ACHARARYA
            ID null
            Sales_Order_No null
            Credit_Outstanding null
            Voucher_Number() null
            Successful execution of query


            Please help to resolve this issue

            Edited by: mukesh.8511@gmail.com on May 18, 2009 9:19 AM
            • 3. Re: SOAPFaultException
              698775
              I found the answer to your question in the Web Service Documentation:

              Query by Template
              To improve performance, the QueryPage result contains only those fields and objects that are
              included in the QueryPage request. To retrieve the values of fields that are not a part of the search
              criteria, the field must be included in the search request with a blank value.

              so you just need to:
              AccountQuery queryCuenta = new AccountQuery();
              QueryType qt = new QueryType();

              //With this empty string you get the Location of the Account you are looking for.
              qt.setString("");
              queryCuenta.setLocation(qt3);
              • 4. Re: SOAPFaultException
                551398
                I'm doing the same as mentioned above.. but i'm still getting the same problem..
                #######
                Code
                #######

                System.out.println("Initializing...");

                CustomObject11Query param= new CustomObject11Query();
                QueryType q = new QueryType();
                q.set_value("='01334170402'");
                q.setSortorder("ASC");
                q.setSortsequence("0");
                param.setStAccount_No(q);

                QueryType qt = new QueryType();
                qt.set_value("");
                param.setQuickSearch1(qt);          

                CustomObject11QueryPage_Input input = new CustomObject11QueryPage_Input();
                input.setListOfCustomObject11(new ListOfCustomObject11Query());
                input.getListOfCustomObject11().setCustomObject11(param);
                input.setLOVLanguageMode("LIC");
                input.setViewMode("Personal");
                System.out.println("Successful execution of query");

                ##############
                OUTOUT
                ##############

                getStAccount_No from SOD is : 01334170402
                getStSell_Rate from SOD is : null
                getStBuy_Rate from SOD is : null
                getStBase_CCY from SOD is : null
                getExternalSystemId from SOD is : null

                Regards
                Balaji Tr.
                balaji.trajalingam@sc.com
                • 5. Re: SOAPFaultException
                  Deepak H Andeli
                  Hope this Code might help..

                  here I query on User Alias for 1316286 and display his SignInId..

                  I have used WebService 2.0 User WSDL

                  public static void main(String[] args) {
                  String strEndPoint = wsLocation + ";jsessionid=" + jSession;
                  UserProxy userProy = new UserProxy();
                  userProy.setEndpoint(strEndPoint);
                  UserQuery uQuery=new UserQuery();
                  QueryType aQT=new QueryType();
                  aQT.set_value("='1316286'");
                  uQuery.setAlias(aQT);
                  uQuery.setUserSignInId(new QueryType(""));
                  UserQueryPage_Input uQI=new UserQueryPage_Input();
                  uQI.setListOfUser(new ListOfUserQuery());
                  uQI.getListOfUser().setUser(uQuery);
                  UserQueryPage_Output uQO = new UserQueryPage_Output();
                  try {
                  uQO = userProy.userQueryPage(uQI);
                  UserData[] userData = uQO.getListOfUser();
                  for (int i = 0; i < userData.length; i++) {
                  System.out.println(userData.getAlias() + " - "+ userData[i].getUserSignInId());
                  }
                  } catch (RemoteException e) {
                  e.printStackTrace();
                  }
                  logoff(wsLocation, jSession);
                  }

                  Output+_

                  jSession : ac190d0b231deeaf3c8c3a774c858433cbeade3fc21a.e34Qc38RaN4SbO0NbheQe0
                  Alias - UserSignId
                  1316286 - abc/abcY6286
                  1316286 - abc/1316286

                  Edited by: Messer on Oct 30, 2009 1:10 AM
                  • 6. Re: SOAPFaultException
                    739287
                    hello,
                    I was interested by the case you showed. I'd like to know how this class "UserProxy" has been built ? What's the code or wich tool generated it from the wsdl file ? If you can take time to help me, thanks a lot ! R.
                    • 7. Re: SOAPFaultException
                      Deepak H Andeli
                      Hi,

                      We get many Tools online that coverts WSDL to Java components, currently we I'm using Eclispse Lomboz 3.3 Web Service Client Tool.

                      You can download it from Eclipse Lomboz Website

                      http://lomboz.ow2.org/downloads/R-3.3_index.php

                      Hope this helps

                      Regards,
                      Messer

                      Edited by: Deepak H Andeli on Dec 10, 2009 9:52 AM
                      • 8. Re: SOAPFaultException
                        739287
                        Thanks.
                        Did you use javax.xml.ws package or javax rpc ?
                        Have a good day.
                        • 9. Re: SOAPFaultException
                          775370
                          When i query account data using Websrivece API from C# dotnet getting below error {System.Web.Services.Protocols.SoapException: EAI Common Internal Error: Invalid search specification '[Account.stEBS_Customer_Id] IS NOT NULL) AND ([Account.stEBS_Customer_Id]='1020'))', Integration component 'Account' does not have an integration component field with XML tag


                          Please help.
                          Thanks
                          Ravi