i keep getting error "Attribute value must be constant". can smb help me out?

hey guys. i have this:
@Endpoint
public class MyEndpoint {

@Autowired
MyService myService;
@Autowired
AppConfig appConfig;
private final String SOAP_NAMESPACE=appConfig.getSoapNamespace();

@PayloadRoot(namespace = SOAP_NAMESPACE,localPart = "idCheckRequest")
@ResponsePayload
public idCheckResponseDTO checkId(@RequestPayload idCheckRequestDTO idCheckRequestDTO) throws IOException {
//code
}
}
@Endpoint
public class MyEndpoint {

@Autowired
MyService myService;
@Autowired
AppConfig appConfig;
private final String SOAP_NAMESPACE=appConfig.getSoapNamespace();

@PayloadRoot(namespace = SOAP_NAMESPACE,localPart = "idCheckRequest")
@ResponsePayload
public idCheckResponseDTO checkId(@RequestPayload idCheckRequestDTO idCheckRequestDTO) throws IOException {
//code
}
}
but i get an error from SOAP_NAMESPACE that says: Attribute value must be constant. can smb help me out with it? bc googling doesnt help. thanks in advance.
11 Replies
JavaBot
JavaBot4mo ago
This post has been reserved for your question.
Hey @bambyzas! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
bambyzas
bambyzasOP4mo ago
but it is:(
No description
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
bambyzas
bambyzasOP4mo ago
done. but for some reason i still get the same error
No description
bambyzas
bambyzasOP4mo ago
what am i doing wrong?
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
bambyzas
bambyzasOP4mo ago
sure
No description
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
szatkus
szatkus4mo ago
For starter, this code can't work. appConfig is injected after SOAP_NAMESPACE is finalized.
JavaBot
JavaBot4mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Want results from more Discord servers?
Add your server