Code Monkey home page Code Monkey logo

fuelsdk-java's People

Contributors

amagar088 avatar cbismuth avatar imurdock avatar kevinjmiles avatar manivinesh avatar red-avtovo avatar rhrituc avatar sfdrogojan avatar sharif26 avatar smunuswami avatar stetzer avatar svc-scm avatar timmysdaman avatar vvitvits avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fuelsdk-java's Issues

Add a subscriber to a list

How do I go about adding a subscriber to a list?
I am able to create an ETList and create an ETSubscriber but I don't see how to add the subscriber to a list.
I noticed that setList and setAttributes had been commented out on the ETSubscriber class.

seistub cannot be cast to org.apache.cxf.frontend.clientproxy

I am trying to use the fuelsdk in an osgi environment. I am getting this error -

java.lang.ClassCastException: com.sun.xml.internal.ws.client.sei.SEIStub cannot be cast to org.apache.cxf.frontend.ClientProxy

This is because OSGi loads the system bundle before the bundle in which fuelsdk's dependency has been embedded. I have been suggested to create the client using -

JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.getInInterceptors().add(new LoggingInInterceptor());
factory.getOutInterceptors().add(new LoggingOutInterceptor());
factory.setServiceClass(HelloWorld.class);
factory.setAddress("http://localhost:9000/helloWorld");
soapClient = (Client) factory.create();

I would like to know which class should I use in factory.setServiceClass();

and

which address should I use in factory.setAddress( ) ; is it the endpoint address ? -- https://webservice.s6.exacttarget.com/Service.asmx

Help is highly appreciated
Thanks

Maven Repository

Is the fuel-java SDK available in a maven repository ?
It would be useful to be able to just include it rather than having to build locally. Either in the Central Repository (maven.org) or a Salesforce/ExactTarget one.

How to fetch dynamic content using soap end point

HI,

I have created dynamic content in salesforce-marketingcloud cms under My Content folder. I am using the soap end points for fetching emails, folders in my project. I want to fetch dynamic contents using the client.retrieve(). I tried client.retrieve(ETContentArea.class). It fetches me Content and A/B Test content but doesn't get Dynamic content. Please can anyone help me with this or let me know if I am missing anything.

Maven dependency

I installed it with a maven dependency and I got an old version. ETDataExtension doesn't contain SendableSubscriberField and SendableDataExtensionField. Please update it.

ETFilter and ETExpression

I'm seeing this error when upgrading from 1.0.1 to 1.0.3

1.0.1

ETFilter nameFilter = new ETFilter();
nameFilter.setProperty("ListName");
nameFilter.addValue("Breaking News");
nameFilter.setOperator(ETFilter.Operator.EQUALS); // ListName = Breaking News

ETFilter andFilter = new ETFilter();
andFilter.getFilters().add(nameFilter);
andFilter.setOperator(ETFilter.Operator.AND);

ETFilter folderFilter = new ETFilter();
folderFilter.setProperty("Category");
folderFilter.addValue("123456");
folderFilter.setOperator(ETFilter.Operator.EQUALS); // Category = 123456

andFilter.getFilters().add(folderFilter); // ListName = Breaking News AND Category = 123456

ETResponse<ETList> response = new ETResponse<>();
response = client.retrieve(ETList.class, andFilter);

correctly retrieves the List named Breaking News in the Folder with the ID 123456

1.0.3

// same code as above throws this error
Index: 0, Size: 0 (java.lang.IndexOutOfBoundsException)
java.util.ArrayList.rangeCheck(ArrayList.java:653)
java.util.ArrayList.get(ArrayList.java:429)
com.exacttarget.fuelsdk.ETExpression.toString(ETExpression.java:183)
com.exacttarget.fuelsdk.ETObject.toString(ETObject.java:112)

I updated our code to use ETExpression, but it seems like client.retrieve(ETList.class, andFilter) only evaluates the main expression, and ignores any subexpressions.

Fuelsdk is failing in the proxy environment

This latest version of fuelsdk is failing if we do proxy environment as many companies have same . I customized the source code to use for proxy connection myself. It is difficult to use source code for the latest version changes if any new release happen. Please Customize the jar to use the proxy connection with fuelsdk jar. Thanks!!

Unable to retrieve ETTriggeredEmails

Hi there,

I'm trying to retrieve list of triggered send definitions, as far as I understood from documentation, ETTriggeredEmail is the class in the SDK which corresponds to triggered send definitions.

Here is piece of Scala code:

  val config = new ETConfiguration()
  config.set("username", "my-username")
  config.set("password", "my-password")
  config.set("soapEndpoint", "https://webservice.s7.exacttarget.com/Service.asmx")

  val client = new ETClient(config)

  val response = client.retrieve(classOf[ETTriggeredEmail])

  Console.println(response)

so, no sophisticated logic at all, to me it looks like "get list of all triggered send definitions". When I run it, i get:

com.exacttarget.fuelsdk.ETResponse[
    batchResult = com.exacttarget.fuelsdk.ETResult[
        requestId = c01dff21-95ab-4459-ac75-c315c0634170
        responseCode = Error: The Request Property(s) SendClassification do not match with the fields of TriggeredSendDefinition retrieve
        responseMessage = Error: The Request Property(s) SendClassification do not match with the fields of TriggeredSendDefinition retrieve
    ]
    individualResults = []
    moreResults = false
]

So, somehow doing a quite basic operation is broken here.

Any help would be appreciated, thanks!

Unable to Delete Row

I am currently running on revision 6651078. If any of this will be fixed in an upcoming release, please let me know.

As of now, I have no way to delete a row in any data extension. Here is my code:

String deName = "Test DE";
        ETFilter deFilter = new ETSimpleFilter("Name", ETFilterOperators.EQUALS, deName);

        ETDataExtension dataExtension;
        try {
            dataExtension = client.retrieveDataExtension(deFilter);
        } catch (ETSdkException e) {
            throw new Exception(String.format("There was no matching data extension with the provided name. Name: %s", deName));
        }

        ETFilter rowFilter = new ETSimpleFilter("Email Address", ETFilterOperators.EQUALS, "[email protected]");

List<ETResult> results;
        try {
            results = dataExtension.delete(rowFilter);
        } catch (ETSdkException e) {
            throw new Exception(String.format("There was an error deleting the row for the data extension. ExtensionName: %s", deName), e);
        }

These calls result in an error code of 310007 and a message of "Keys Not Found". I have also tried utilizing the deprecated service, in addition to trying to use the deprecated setter for "Keys" but have had no success:

// Deprecated stuff fails as well
        List<ETDataExtensionRow> rowList = dataExtension.select(rowFilter);
        Map<String, String> blah = new HashMap<String, String>();
        blah.put("Email Address", "[email protected]");
        rowList.get(0).setKeys(blah);
        ETResponse<ETResult> response;
        try {
            rowList.get(0).setName(deName);
            response = dataExtensionRowService.delete(client, rowList.get(0));
        } catch (ETSdkException e){
            throw new Exception(String.format("There was error deleting the row for the data extension. ExtensionName: %s", deName));
        }

Furthermore, I have found a related issue in the ruby sdk that could potentially be related given the "properties/property" vs "keys/key". http://salesforce.stackexchange.com/questions/33398/fuel-sdk-ruby-client-delete-a-row-from-a-data-extension

Is this an issue of needing to be refactored, not using the calls in the correct manner, or not using the most recent version of the sdk (which is broken, see other issue I've created). Any information would be helpful.

PS: To be clear, all of the objects and their names are correct and return the corresponding object back to my client. I have traced the issue directly until the point in which the SOAP call is made.

'Text Only' email type

Hi, could you please add 'Text Only' email type to ETEmail class?

public enum Type {
HTML("HTML"),
TEXT("Text"),
Normal("Normal"),
TextOnly("Text Only");
private final String value;
.
.
.
Thank you!

ETDataExtensionColumn

Hi,
could you explain me, what is the purpose of the .toLowerCase() call when setting a Name for Column in DataExtension?

column.setName(name.toLowerCase());

Maven update

Hi,
please revide the version uplouded to maven, because it seems to be something much older than the 1.2.1. 1.2.2 isn't even available.
Thank you

Support for Contacts

Does this SDK support "Contact" creation for Marketing Cloud? Example: /contacts/v1/contacts

Calling retrieveObject in ETClient with filter that produces no results causes NullPointerException

When calling retrieveObject in ETClient with a filter that produces no results, i.e. the key doesn't exist, the individualResults field in ETResponse is empty so the condition if( individualResults.size() == 0) passes and null is returned for getResult(). The call of getResult().getObject() in ETResponse's getObject method then causes a NullPointerException.

The response should be checked for null condition, and if it is null, return null as the result object.

All tests skipped/failing

I am not sure if that is just my own odd configuration problem or something else...

All tests seem to be skipped at the moment and when I add fuelsdk-test.properties more than 20 tests are failing.
All failures are in ETDataExtension.select() methods, caused by the rowset returned from ETSoapConnection unsorted and not paged - is that expected behaviour?

Is that just me, do I miss something?

No binding factory for namespace http://schemas.xmlsoap.org/wsdl/soap/ registered.

When fuel SDK is exported as Runnable JAR (Extract required libriries into generated JAR option),

ETClient client = new ETClient(); throws

2014-06-23T16:17:55.509+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: GET https://www.exacttargetapis.com/platform/v1/endpoints/soap 
2014-06-23T16:17:55.740+0200 main com.exacttarget.fuelsdk.ETClient DEBUG: requesting new access token... 
2014-06-23T16:17:55.761+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: POST https://auth.exacttargetapis.com/v1/requestToken 
2014-06-23T16:17:55.762+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: Content-Type: application/json 
2014-06-23T16:17:55.770+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: { 
2014-06-23T16:17:55.770+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG:   "clientId": "XXX", 
2014-06-23T16:17:55.771+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG:   "clientSecret": "YYY", 
2014-06-23T16:17:55.771+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG:   "accessType": "offline" 
2014-06-23T16:17:55.771+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: } 
2014-06-23T16:17:59.214+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: 200 OK 
2014-06-23T16:17:59.218+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: { 
2014-06-23T16:17:59.218+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG:   "accessToken": "ZZZ", 
2014-06-23T16:17:59.219+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG:   "expiresIn": 3554, 
2014-06-23T16:17:59.219+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG:   "refreshToken": "ZZZZ" 
2014-06-23T16:17:59.220+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: } 
2014-06-23T16:17:59.221+0200 main com.exacttarget.fuelsdk.ETClient DEBUG: received token: 
2014-06-23T16:17:59.225+0200 main com.exacttarget.fuelsdk.ETClient DEBUG:   accessToken: ZZZ
2014-06-23T16:17:59.225+0200 main com.exacttarget.fuelsdk.ETClient DEBUG:   expiresIn: 3554 
2014-06-23T16:17:59.226+0200 main com.exacttarget.fuelsdk.ETClient DEBUG:   refreshToken: ZZZZ
2014-06-23T16:17:59.234+0200 main com.exacttarget.fuelsdk.ETClient DEBUG: new access token expires at Mon Jun 23 17:17:13 CEST 2014 
2014-06-23T16:17:59.234+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: Accept: application/json 
2014-06-23T16:18:00.150+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: 200 OK 
2014-06-23T16:18:00.152+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: { 
2014-06-23T16:18:00.152+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG:   "type": "soap", 
2014-06-23T16:18:00.153+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG:   "url": "https://webservice.s4.exacttarget.com/Service.asmx" 
2014-06-23T16:18:00.153+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: } 
2014-06-23T16:18:00.154+0200 main com.exacttarget.fuelsdk.ETClient DEBUG: SOAP endpoint: https://webservice.s4.exacttarget.com/Service.asmx 
23-jun-2014 16:18:04 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL
INFO: Creating Service {http://exacttarget.com/wsdl/partnerAPI}PartnerAPI from WSDL: file:/C:/workspace/prueba/bin/etframework.wsdl
Exception in thread "main" javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:334)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:319)
at javax.xml.ws.Service.getPort(Service.java:92)
at com.exacttarget.fuelsdk.internal.PartnerAPI.getSoap(PartnerAPI.java:60)
at com.exacttarget.fuelsdk.ETSoapConnection.<init>(ETSoapConnection.java:74)
at com.exacttarget.fuelsdk.ETClient.<init>(ETClient.java:134)
at com.exacttarget.fuelsdk.ETClient.<init>(ETClient.java:69)
at Probando.main(Probando.java:33)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:97)
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:156)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:156)
at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:465)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:332)
... 7 more
Caused by: org.apache.cxf.BusException: No binding factory for namespace http://schemas.xmlsoap.org/wsdl/soap/ registered.
at org.apache.cxf.bus.managers.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:123)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:116)
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
... 11 more

Normally, it prints these messages:

2014-06-23T16:31:45.157+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: GET https://www.exacttargetapis.com/platform/v1/endpoints/soap 
2014-06-23T16:31:45.413+0200 main com.exacttarget.fuelsdk.ETClient DEBUG: requesting new access token... 
2014-06-23T16:31:45.442+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: POST https://auth.exacttargetapis.com/v1/requestToken 
2014-06-23T16:31:45.443+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: Content-Type: application/json 
2014-06-23T16:31:45.449+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: { 
2014-06-23T16:31:45.450+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG:   "clientId": "XXX", 
2014-06-23T16:31:45.451+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG:   "clientSecret": "YYY", 
2014-06-23T16:31:45.451+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG:   "accessType": "offline" 
2014-06-23T16:31:45.452+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: } 
2014-06-23T16:31:48.972+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: 200 OK 
2014-06-23T16:31:48.977+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: { 
2014-06-23T16:31:48.977+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG:   "accessToken": "ZZZ", 
2014-06-23T16:31:48.978+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG:   "expiresIn": 3600, 
2014-06-23T16:31:48.978+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG:   "refreshToken": "ZZZZ" 
2014-06-23T16:31:48.979+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: } 
2014-06-23T16:31:48.980+0200 main com.exacttarget.fuelsdk.ETClient DEBUG: received token: 
2014-06-23T16:31:49.013+0200 main com.exacttarget.fuelsdk.ETClient DEBUG:   accessToken: ZZZ
2014-06-23T16:31:49.013+0200 main com.exacttarget.fuelsdk.ETClient DEBUG:   expiresIn: 3600 
2014-06-23T16:31:49.013+0200 main com.exacttarget.fuelsdk.ETClient DEBUG:   refreshToken: ZZZZ
2014-06-23T16:31:49.019+0200 main com.exacttarget.fuelsdk.ETClient DEBUG: new access token expires at Mon Jun 23 17:31:49 CEST 2014 
2014-06-23T16:31:49.019+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: Accept: application/json 
2014-06-23T16:31:49.990+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: 200 OK 
2014-06-23T16:31:49.992+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: { 
2014-06-23T16:31:49.992+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG:   "type": "soap", 
2014-06-23T16:31:49.992+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG:   "url": "https://webservice.s4.exacttarget.com/Service.asmx" 
2014-06-23T16:31:49.993+0200 main com.exacttarget.fuelsdk.ETRestConnection DEBUG: } 
2014-06-23T16:31:49.994+0200 main com.exacttarget.fuelsdk.ETClient DEBUG: SOAP endpoint: https://webservice.s4.exacttarget.com/Service.asmx 
23-jun-2014 16:31:56 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL
INFO: Creating Service {http://exacttarget.com/wsdl/partnerAPI}PartnerAPI from WSDL: file:/C:/workspace/fuelsdk/target/classes/etframework.wsdl
2014-06-23T16:32:00.785+0200 main com.exacttarget.fuelsdk.ETSoapConnection DEBUG: updated SOAP header with new access token ZZZ

Initializing ETClient for REST connection requires CXF

I think the following code should do the trick:

public ETSoapConnection getSoapConnection() throws ETSdkException{
        if (soapConnection == null) {
            if (soapEndpoint == null) {
                String response = restConnection.get(PATH_ENDPOINTS_SOAP);
                JsonParser jsonParser = new JsonParser();
                JsonObject jsonObject = jsonParser.parse(response).getAsJsonObject();
                soapEndpoint = jsonObject.get("url").getAsString();
                logger.debug("SOAP endpoint: " + soapEndpoint);
            }

            soapConnection = new ETSoapConnection(this, soapEndpoint);
        }

        return soapConnection;
    }

Unable to Build

Most current project will not build. "mvn generate-sources" completes fine, however once running "mvn install -DskipTests" I receive the following error (verbosity excluded):

[ERROR] C:/.../ETSoapObject.java:[1287,29] name clash: getInternalProperty(<? extends ETSoapObject>, String) in ETSoapObject and getInternalProperty(<? extends ETObject>, String) in ETObject have the same erasure, yet neither hides the other.

The most recent checkout that I was able to build successfully was:

SHA-1: 14c7f22

PS: On a side note, I'm attempting to update from .999999-pre1.0-1 in an attempt to fix issues with deleting a row into a data extension and deleting a data extension as I'm using deprecated services (at least in terms of the deleting the extension, the row deletion is not working at all). I figured the update could potentially remedy these situations, however I am unable to continue any further testing.

Unable to locate ETFrameworkFault.xsd file

@amagar088

I've recently updated my project to use Java 8 and have since been running into issues with Fuel SDK.
Has there been any significant changes to how ET and Fuel SDK is to be implemented?
The following exception is thrown when I use either version 1.0.3 or 1.1.0 with CXF version 2.7.16 or 3.1.0.
I have also attempted to add the required file to my project's resource folder.

javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:347)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:336)
at javax.xml.ws.Service.getPort(Service.java:119)
at com.exacttarget.fuelsdk.internal.PartnerAPI.getSoap(PartnerAPI.java:63)
at com.exacttarget.fuelsdk.ETSoapConnection.(ETSoapConnection.java:89)
at com.exacttarget.fuelsdk.ETSoapConnection.(ETSoapConnection.java:178)
at com.exacttarget.fuelsdk.ETClient.(ETClient.java:158)
at com.olson.bostonpizza.service.messagequeue.exacttarget.ExactTargetSubscriberConsumer.registerNewUser(ExactTargetSubscriberConsumer.java:70)
at com.olson.bostonpizza.service.messagequeue.exacttarget.ExactTargetRegisterSubscriberConsumer.handleDelivery(ExactTargetRegisterSubscriberConsumer.java:128)
at com.rabbitmq.client.impl.ConsumerDispatcher$5.run(ConsumerDispatcher.java:144)
at com.rabbitmq.client.impl.ConsumerWorkService$WorkPoolRunnable.run(ConsumerWorkService.java:99)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
at org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:183)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:428)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:548)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:265)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:215)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102)
at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:91)
at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:157)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:142)
at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:478)
at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:345)
... 13 more
Caused by: org.apache.ws.commons.schema.XmlSchemaException: Unable to locate imported document at 'https://webservice.exacttarget.com/ETFrameworkFault.xsd', relative to 'jar:file:/Users/37311/.m2/repository/com/exacttarget/fuelsdk/1.1.0/fuelsdk-1.1.0.jar!/etframework.wsdl#types1'.
at org.apache.cxf.catalog.CatalogXmlSchemaURIResolver.resolveEntity(CatalogXmlSchemaURIResolver.java:76)
at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:684)
at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:538)
at org.apache.ws.commons.schema.SchemaBuilder.handleSchemaElementChild(SchemaBuilder.java:1513)
at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:659)
at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:540)
at org.apache.cxf.common.xmlschema.SchemaCollection.read(SchemaCollection.java:129)
at org.apache.cxf.wsdl11.SchemaUtil.extractSchema(SchemaUtil.java:140)
at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:73)
at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:65)
at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:60)
at org.apache.cxf.wsdl11.WSDLServiceBuilder.getSchemas(WSDLServiceBuilder.java:372)
at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:339)
at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:203)
at org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:175)
... 23 more

NullPointerException in login

I am using fuel-java-1.0.1. Using the following code for login:

ETConfiguration configuration = new ETConfiguration();
configuration.set("clientId", "my-client-id");
configuration.set("clientSecret", "my-client-secret");
ETClient client = new ETClient(configuration);

Intermittently, it fails with the following exception:

Caused by: java.lang.NullPointerException
    at com.exacttarget.fuelsdk.ETClient.<init>(ETClient.java:131) ~[fuel-java-1.0.1.jar:?]

How to resolve the issue?

Will the latest version help?

cross-posted: http://salesforce.stackexchange.com/questions/143160/fuel-sdk-java-nullpointerexception-in-login

Add support for Upserts to ETSoapObject#update

According to the Marketing Cloud article below (1), it is possible to do an Upsert in a DataExtension.
Please, provide this option also for the Fuel Java SDK.

A suggestion: maybe offer an update method, which accepts as an argument UpdateOptions to be used during creation of the UpdateRequest.

public static <T extends ETSoapObject> ETResponse<T> update(ETClient client,
                                                            List<T> objects, 
                                                            UpdateOptions updateOptions)
    throws ETSdkException
{
    ETResponse<T> response = new ETResponse<T>();

    if (objects == null || objects.size() == 0) {
        response.setStatus(ETResult.Status.OK);
        return response;
    }

    //
    // Get handle to the SOAP connection:
    //
    ETSoapConnection connection = client.getSoapConnection();

    //
    // Automatically refresh the token if necessary:
    //
    client.refreshToken();

    //
    // Perform the SOAP update:
    //
    Soap soap = connection.getSoap();

    UpdateRequest updateRequest = new UpdateRequest();
    updateRequest.setOptions(updateOptions);
    for (T object : objects) {
        object.setClient(client);
        updateRequest.getObjects().add(object.toInternal());
    }

The UpdateOptions can receive a SaveAction.UPDATE_ADD

SaveOption upsertOption = new SaveOption();
upsertOption.setSaveAction(SaveAction.UPDATE_ADD);
upsertOption.setPropertyName("dataExtensionName");

UpdateOptions option = new UpdateOptions();
List<SaveOption> saveOption = option.getSaveOptions().getSaveOption();
saveOption.add(upsertOption);

(1) https://help.marketingcloud.com/en/technical_library/web_service_guide/technical_articles/managing_data_in_data_extensions/

Can't delete row

Looks like the issue still exist (#12 )

ETDataExtensionRow row = new ETDataExtensionRow();
row.setDataExtensionKey("12121212-121212-1212-12121");
row.setColumn("SUBSCRIBERKEY", "[email protected]");
ETResponse<ETDataExtensionRow> res = client.delete(record);

Gettting error: Keys Not Found

Inconsistency with search.maven.org and versions in this repo

On search.maven.org, I see a version entry for 1.1.0 created in October 2015. When I download this and attempt to use it to access the ETSubscriber.getAttributes() method, I'm finding that the method is not found.

Upon further inspection, it appears as though support for this method was released on Tue May 17 11:16:17 2016 -0400 as part of merge commit 36691a3. The version deployed and seemingly marked as a production-ready release (not a snapshot) was made before this point.

It also doesn't appear as though a 1.1.0 tag was created when the deployment was made.

In trying to understand what's happened here, my best guess is that a snapshot was deployed with a version number that doesn't conform to the SNAPSHOT qualifier as listed at https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN401.

Two questions come out of this:

  1. What's the expected release date for the formal 1.1.0 release?
  2. Is there a different way of releasing versions in the future so as to match Maven community expectations?

Thanks!

Tomcat 8 Failed to create service

I'm getting the following exception on my server when setting up an ETClient.
Local on my Mac (java 8, tomcat 8) it runs fine.
The server is Ubuntu running Java 8 and Tomcat 8. Any help would be appreciated.

java version "1.8.0_05"

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.5 LTS"
NAME="Ubuntu"
VERSION="12.04.5 LTS, Precise Pangolin"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu precise (12.04.5 LTS)"
VERSION_ID="12.04"

Tomcat Version : Apache Tomcat/8.0.9
Servlet Specification Version : 3.1
JSP version : 2.3

ETClientTest.java
102. ETClient client;
103. try {
104.        client = new ETClient(config);


 javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
    at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:149)
    at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:98)
    at javax.xml.ws.Service.<init>(Service.java:77)
    at com.exacttarget.fuelsdk.internal.PartnerAPI.<init>(PartnerAPI.java:49)
    at com.exacttarget.fuelsdk.ETSoapConnection.<init>(ETSoapConnection.java:78)
    at com.exacttarget.fuelsdk.ETClient.<init>(ETClient.java:134)
    at ETClientTest.java:104)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
    at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:100)
    at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:199)
    at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:147)
    ... 14 more
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: java.lang.RuntimeException: Cannot create a secure XMLInputFactory
    at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:256)
    at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:205)
    at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:98)
    ... 16 more
Caused by: java.lang.RuntimeException: Cannot create a secure XMLInputFactory
    at org.apache.cxf.staxutils.StaxUtils.createXMLInputFactory(StaxUtils.java:300)
    at org.apache.cxf.staxutils.StaxUtils.getXMLInputFactory(StaxUtils.java:255)
    at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1416)
    at org.apache.cxf.staxutils.StaxUtils.createXMLStreamReader(StaxUtils.java:1318)
    at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:246)
    ... 18 more

FuelSDK-Java JDK 9 known issue

Java 9 SE has removed some jars (specifically JAXB) from Java 9 SE which causes this exception at runtime. Other users have reported similar issues and possible workarounds here

Quick Workaround:
Specify the following command-line option to javac and java:
--add-modules java.se.ee

javac --add-modules java.se.ee -classpath "" Jdk9Main.java
java --add-modules java.se.ee -classpath ";." Jdk9Main

For full details on Java modularity is discussed on the JEP 261 page:

Inserting a row in DataExtension via Java FuelSDk not working

I'm trying to insert rows into my Data Extensions via the Java FuelSdk.
I'm able to get the client and get the Data Extension. Creating the row is straight forward.
I'm not able to do the actual insert. I get an IllegalArgumentException. I'm using the latest version of the Java FuelSDK jar from the GitHub. I'm also using the latest apache commons libs.
My code looks like this:

    try
    {
        ETClient client = new ETClient(new ETConfiguration());

        List<String> productFilterList = new ArrayList<String>();
        productFilterList.add("eMessages_product");
        filter = new ETSimpleFilter("Name", ETFilterOperators.EQUALS, productFilterList);
        ETDataExtension productDE = client.retrieveDataExtension(filter);

        ETDataExtensionRow row = new ETDataExtensionRow();
        row.setColumn("feedbackId", "12345678");
        row.setColumn("product-handle", "MSCS");
        row.setColumn("product-name", "MSCS");
        row.setColumn("product-quantity", "1");

        List<ETResult> results = productDE.insert(row);
    }
    catch(ETSdkException e)
    {
        e.printStackTrace();
    }

But I'm getting this stack trace:

Sep 11, 2014 2:21:00 PM org.apache.commons.beanutils.PropertyUtilsBean invokeMethod
SEVERE: Method invocation failed.
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:1773)
at org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:1759)
at org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(PropertyUtilsBean.java:1648)
at org.apache.commons.beanutils.PropertyUtilsBean.setProperty(PropertyUtilsBean.java:1677)
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1022)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:313)
at com.exacttarget.fuelsdk.ETSoapObject.toInternal(ETSoapObject.java:738)
at com.exacttarget.fuelsdk.soap.ETCrudServiceImpl.post(ETCrudServiceImpl.java:92)
at com.exacttarget.fuelsdk.soap.ETDataExtensionRowServiceImpl.post(ETDataExtensionRowServiceImpl.java:179)
at com.exacttarget.fuelsdk.ETDataExtension.insert(ETDataExtension.java:240)
at com.mt.ecom.et.TestExactTarget.main(TestExactTarget.java:59)

com.exacttarget.fuelsdk.ETSdkException: could not set property "properties" of object com.exacttarget.fuelsdk.internal.DataExtensionObject@3ed4881e[name=eMessages_product,keys=,type=,properties=,client=,partnerKey=,partnerProperties=,createdDate=,modifiedDate=,id=,objectID=,customerKey=,owner=,correlationID=,objectState=]
at com.exacttarget.fuelsdk.ETSoapObject.toInternal(ETSoapObject.java:743)
at com.exacttarget.fuelsdk.soap.ETCrudServiceImpl.post(ETCrudServiceImpl.java:92)
at com.exacttarget.fuelsdk.soap.ETDataExtensionRowServiceImpl.post(ETDataExtensionRowServiceImpl.java:179)
at com.exacttarget.fuelsdk.ETDataExtension.insert(ETDataExtension.java:240)
at com.mt.ecom.et.TestExactTarget.main(TestExactTarget.java:59)
Caused by: java.lang.IllegalArgumentException: Cannot invoke com.exacttarget.fuelsdk.internal.ObjectExtension.setProperties - argument type mismatch
at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:1778)
at org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:1759)
at org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(PropertyUtilsBean.java:1648)
at org.apache.commons.beanutils.PropertyUtilsBean.setProperty(PropertyUtilsBean.java:1677)
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1022)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:313)
at com.exacttarget.fuelsdk.ETSoapObject.toInternal(ETSoapObject.java:738)
... 4 more

ETCampaignAsset can't be created

I'm trying to create ETCampaignAsset with FuelSDK but the server always return 500 and the application throw this Exception

com.exacttarget.fuelsdk.ETSdkException: error invoking create method for type class com.exacttarget.fuelsdk.ETCampaignAsset

	at com.exacttarget.fuelsdk.ETClient.createUpdateDelete(ETClient.java:978)
	at com.exacttarget.fuelsdk.ETClient.create(ETClient.java:795)
	at org.embulk.output.salesforce_marketing_cloud.TestSalesforceMarketingCloudOutputPlugin.assignDataExenionToCampaign(TestSalesforceMarketingCloudOutputPlugin.java:101)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.exacttarget.fuelsdk.ETClient.createUpdateDelete(ETClient.java:976)
	... 24 more
Caused by: java.lang.NullPointerException
	at java.io.Reader.<init>(Reader.java:78)
	at java.io.InputStreamReader.<init>(InputStreamReader.java:72)
	at com.exacttarget.fuelsdk.ETRestConnection.receiveResponse(ETRestConnection.java:329)
	at com.exacttarget.fuelsdk.ETRestConnection.post(ETRestConnection.java:136)
	at com.exacttarget.fuelsdk.ETRestObject.createUpdateDelete(ETRestObject.java:405)
	at com.exacttarget.fuelsdk.ETRestObject.create(ETRestObject.java:297)
	... 29 more

Take a deeper look in the code show me that there is the library are sending request to this url
https://www.exacttargetapis.com/hub/v1/campaigns/{campaignId}/assets without interpolate the campaignId. I also couldn't find any logic that populate this kind of path(nested) in library code.

Triggered send via CXF

Web Service running on WebSphere Runtime 8.0.0.9 for invoking triggered send via a CXF client is giving the following error..

The code executed on WebSphere Server fails with incompatibility errors

org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler incompatible with org.apache.cxf.frontend.ClientProxy

We find that the Provider used when Junit runs is (org.apache.cxf.ws.) which is different when the code is executed via WebSphere server (org.apache.axis2.ws ..)

No enum constant com.exacttarget.fuelsdk.ETEmail.Type.Normal

When retrieving email, I get an exception as it tries to instantiate an ETEmail and doesn't find ETEmail.Type.Normal.

Sample code (Scala):

import com.exacttarget.fuelsdk.{ETEmail, ETResponse, ETFilter, ETClient}

object Sample extends App {
  val filename = "/path/to/fuelsdk.properties"
  val client = new ETClient(filename)
  client.retrieve(classOf[ETEmail], new ETFilter)
}

Stack trace:

Exception in thread "main" com.exacttarget.fuelsdk.ETSdkException: error invoking retrieve method for type class com.exacttarget.fuelsdk.ETEmail
    at com.exacttarget.fuelsdk.ETClient.retrieve(ETClient.java:425)
    at com.exacttarget.fuelsdk.ETClient.retrieve(ETClient.java:373)
    at Sample$.delayedEndpoint$Sample$1(Sample.scala:8)
    at Sample$delayedInit$body.apply(Sample.scala:4)
    at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
    at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
    at scala.App$$anonfun$main$1.apply(App.scala:76)
    at scala.App$$anonfun$main$1.apply(App.scala:76)
    at scala.collection.immutable.List.foreach(List.scala:381)
    at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
    at scala.App$class.main(App.scala:76)
    at Sample$.main(Sample.scala:4)
    at Sample.main(Sample.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.exacttarget.fuelsdk.ETClient.retrieve(ETClient.java:418)
    ... 17 more
Caused by: com.exacttarget.fuelsdk.ETSdkException: could not set property "type" of object com.exacttarget.fuelsdk.ETEmail[
    id = 9029
    key = FF9E9FBA-2073-4221-8A85-AC8BA0BFD6F2
    name = Welcome
    createdDate = Fri Oct 02 14:38:53 CDT 2015
    modifiedDate = Fri Oct 02 15:38:10 CDT 2015
    folderId = 57549
    subject = Salesforce Marketing test for %%fullname%%
    htmlBody = <html>
<body>
<p>
  Hello, %%firstname%%!  This was scheduled to be sent at 5pm on Friday afternoon.
</p>
<small>
  <p>This email was sent by:</p>
  <p>
    %%Member_Busname%%
    <br />
    %%Member_Addr%%
    <br />
    %%Member_City%%, %%Member_State%% %%Member_PostalCode%%
    <br />
    %%Member_Country%%
  </p>
  <a href="%%profile_center_url%%">Profile Center</a>
</small>
<custom name="opencounter" type="tracking">
</body>
</html>
    textBody = 
    isHtmlPaste = true
]
    at com.exacttarget.fuelsdk.ETSoapObject.fromInternal(ETSoapObject.java:966)
    at com.exacttarget.fuelsdk.ETSoapObject.retrieve(ETSoapObject.java:335)
    at com.exacttarget.fuelsdk.ETSoapObject.retrieve(ETSoapObject.java:149)
    at com.exacttarget.fuelsdk.ETSoapObject.retrieve(ETSoapObject.java:131)
    ... 22 more
Caused by: java.lang.IllegalArgumentException: No enum constant com.exacttarget.fuelsdk.ETEmail.Type.Normal
    at java.lang.Enum.valueOf(Enum.java:238)
    at com.exacttarget.fuelsdk.ETSoapObject$EnumConverter.convert(ETSoapObject.java:860)
    at org.apache.commons.beanutils.ConvertUtilsBean.convert(ConvertUtilsBean.java:491)
    at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1000)
    at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:454)
    at com.exacttarget.fuelsdk.ETSoapObject.fromInternal(ETSoapObject.java:962)
    ... 25 more

Dependency issues with FuelSDK

Hi Team,

As mentioned in code, I have added Fuelsdk dependency in pom, but when I run the code, it is keep on giving me errors in runtime one after another, Issue started with this below runtime error.
Ex. java.lang.NoClassDefFoundError: org/apache/cxf/frontend/ClientProxy.
cxf-rt-frontend-simple-3.1.11.jar of this class is present in local repository (which was downloaded as part of fuelsdk dependency) and able to import this class any of the java file, but it is not getting picked up in runtime.

If I add this CXF related dependency , then I am facing bundle issues. Like never ending.
I have attached poms zip below, and in pom.xml you can see after fuelsdk dependency , there are list of dependencies I have added to solve issues, and issues didn't stop even after.
Please let me know if I am missing any dependency to add, and Will you please help me in dependecies.

Thanks in advance!!
POMs.zip

The code from the repo doesn't compile, packaging fails.

I followed the instructions to compile the Fuel SDK from source. The packaging step fails with the compilation error. I didnt add/edit anything in the pom. It was straight from the git.

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /D:/Workspace/FuelSDKTest/fuel-java/src/main/java/com/exacttarget/fuelsdk/audiencebuilder/ETAudience.java:[263,42] name clash: retrieve(com.exacttarget.fuelsdk.ETClient,java.lang.Class<com.exacttarget.fuelsdk.audiencebuilder.ETAudience>,java.lang.Integer,java.lang.Integer,com.exacttarget.fuelsdk.ETFilter) in com.exacttarget.fuelsdk.audiencebuilder.ETAudience and retrieve(com.exacttarget.fuelsdk.ETClient,java.lang.Class,java.lang.Integer,java.lang.Integer,com.exacttarget.fuelsdk.ETFilter) in com.exacttarget.fuelsdk.ETRestObject have the same erasure, yet neither hides the other
[ERROR] /D:/Workspace/FuelSDKTest/fuel-java/src/main/java/com/exacttarget/fuelsdk/audiencebuilder/ETDimension.java:[126,43] name clash: retrieve(com.exacttarget.fuelsdk.ETClient,java.lang.Class<com.exacttarget.fuelsdk.audiencebuilder.ETDimension>,java.lang.Integer,java.lang.Integer,com.exacttarget.fuelsdk.ETFilter) in com.exacttarget.fuelsdk.audiencebuilder.ETDimension and retrieve(com.exacttarget.fuelsdk.ETClient,java.lang.Class,java.lang.Integer,java.lang.Integer,com.exacttarget.fuelsdk.ETFilter) in com.exacttarget.fuelsdk.ETRestObject have the same erasure, yet neither hides the other

image

Already connected exception

When I update my application from Fuel SDK version 1.2.0 to 1.2.1 I get an "Already connected" exception...

play.api.UnexpectedException: Unexpected exception[IllegalStateException: Already connected]
Caused by: java.lang.IllegalStateException: Already connected
	at sun.net.www.protocol.http.HttpURLConnection.getRequestProperties(HttpURLConnection.java:3142)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getRequestProperties(HttpsURLConnectionImpl.java:358)
	at com.exacttarget.fuelsdk.ETRestConnection.sendRequest(ETRestConnection.java:278)
	at com.exacttarget.fuelsdk.ETRestConnection.sendRequest(ETRestConnection.java:223)
	at com.exacttarget.fuelsdk.ETRestConnection.post(ETRestConnection.java:135)
	at com.exacttarget.fuelsdk.ETClient.requestToken(ETClient.java:330)
	at com.exacttarget.fuelsdk.ETClient.requestToken(ETClient.java:292)
	at com.exacttarget.fuelsdk.ETClient.<init>(ETClient.java:156)
	at services.ExactTargetApi.<init>(ExactTargetApi.scala:15)
	at AppComponents.exactTarget$lzycompute(AppComponents.scala:35)

version confusion

Hello,

  • on salesforce page javadoc for a 1.1.0-pre1 is published
  • on master readme, it sais to use dependency 1.1.0
  • there is no 1.1.0 tag or branch in github project
  • there is no 1.1.0 release in github project
  • dependency 1.1.0 works but a provides a version I cannot explain
    • 1.1.0-pre1 javadoc has a ETSubscriber.html#unsubscribe()
    • in 1.1.0 by maven/gradle dependency, the method is in source but commented out
    • on master, and all branches and tags, the method is not there at all.

Can you please clean up the version confusion ?
Many thanks, Tom.

Nullpointer when calling response.getObject()

Hello,

it's a bit disturbing that a NullpointerException is thrown when calling
response.getObject();

Example:

ETResponse<ETList> response = client.retrieve(ETList.class, filter);
// assertNotNull(response);
ETList etList = response.getObject();
// .... will fail under certain circumstances. 

This can easily fixed in ETResponse.java:

public T getObject() {
        ETResult<T> result = getResult();
        if (result != null)
            return result.getObject();
        return null;
}

Would love to have this implemented this way.
Thanks

Add key/customerKey for ETTriggeredSendSummary

This Scala code:

    val expression = new ETExpression
    expression.setProperty("customerKey")
    expression.setOperator(Operator.EQUALS)

    expression.addValue("my-customer-key")

    val filter = new ETFilter
    filter.addProperty("customerKey")
    filter.addProperty("queued")
    filter.addProperty("sent")
    filter.addProperty("bounces")
    filter.setExpression(expression)

    val response = client.retrieve(classOf[ETTriggeredSendSummary], filter)
    // do stuff with response

is working without any problems, but it seems returned value is getting lost because ETTriggeredSendSummary class does not have key or customerKey properties. I'm 100% sure value is returned by API, because I'm getting it if I write code for the same purpose using .NET SOAP implementation.

If I'm understanding it correctly, you just need to add something like this:
https://github.com/salesforce-marketingcloud/FuelSDK-Java/blob/master/src/main/java/com/exacttarget/fuelsdk/ETTriggeredEmail.java#L80-L82
and this:
https://github.com/salesforce-marketingcloud/FuelSDK-Java/blob/master/src/main/java/com/exacttarget/fuelsdk/ETTriggeredEmail.java#L150-L162

to this class:
https://github.com/salesforce-marketingcloud/FuelSDK-Java/blob/master/src/main/java/com/exacttarget/fuelsdk/ETTriggeredSendSummary.java#L22

and it should work. Would you, guys, please, do it? I can also prepare a pull request for this if you want.

Set ErrorMessage on errors

Using the SDK to create or update an object, we get error codes in the result but no accompanying error messages. The error message is in the CreateResult object for a DataExtensionRowCreate operation but we never actually get that message back in ETResult when using the SDK. In fact, I don't see ErrorMessage ever being set anywhere. The error codes themselves are not descriptive enough to identify the problem. Currently we have to leave INFO level logging on to see the actual error message.

The errorMessage field on ETResult should contain any and all errors (KeyError or otherwise).

No enum constant com.exacttarget.fuelsdk.ETEmail.Type.Text Only

I'm getting the following error while trying to retrieve emails from the SalesForce Marketing Cloud:

Exception in thread "main" com.exacttarget.fuelsdk.ETSdkException: error invoking retrieve method for type class com.exacttarget.fuelsdk.ETEmail
	at com.exacttarget.fuelsdk.ETClient.retrieve(ETClient.java:514)
	at com.exacttarget.fuelsdk.ETClient.retrieve(ETClient.java:460)
	at io.acornanalytics.templategetter.Main.main(Main.java:35)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at com.exacttarget.fuelsdk.ETClient.retrieve(ETClient.java:507)
	... 2 more
Caused by: com.exacttarget.fuelsdk.ETSdkException: could not set property "type" of object com.exacttarget.fuelsdk.ETEmail[
    id = 113
    key = 6D735C99-9713-4370-A7A8-E090EFBA5FE1
    name = SAP Test %%memberid%%
    createdDate = Wed Sep 14 10:28:14 EDT 2016
    modifiedDate = Wed Sep 14 10:28:19 EDT 2016
    folderId = 2630
    subject = SAP Test %%memberid%%
    htmlBody =
    textBody = This email was sent by:
%%Member_Busname%%
%%Member_Addr%%
%%Member_City%%, %%Member_State%%, %%Member_PostalCode%%, %%Member_Country%%Update Your Profile: %%profile_center_url%%
    isHtmlPaste = true
]
	at com.exacttarget.fuelsdk.ETSoapObject.fromInternal(ETSoapObject.java:1101)
	at com.exacttarget.fuelsdk.ETSoapObject.retrieve(ETSoapObject.java:390)
	at com.exacttarget.fuelsdk.ETSoapObject.retrieve(ETSoapObject.java:173)
	at com.exacttarget.fuelsdk.ETSoapObject.retrieve(ETSoapObject.java:149)
	... 7 more
Caused by: java.lang.IllegalArgumentException: No enum constant com.exacttarget.fuelsdk.ETEmail.Type.Text Only
	at java.lang.Enum.valueOf(Enum.java:238)
	at com.exacttarget.fuelsdk.ETSoapObject$EnumConverter.convert(ETSoapObject.java:989)
	at org.apache.commons.beanutils.ConvertUtilsBean.convert(ConvertUtilsBean.java:491)
	at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1000)
	at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:454)
	at com.exacttarget.fuelsdk.ETSoapObject.fromInternal(ETSoapObject.java:1097)
	... 10 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.